Forum

Notifications
Clear all

[Solved] Pivot table analyze

7 Posts
3 Users
0 Reactions
187 Views
(@lizch)
Posts: 3
Active Member
Topic starter
 

I have a pivot table filtered by year - in this case 2024. The pivot table has 3 columns - month, quantity, refund. I tried to do a calculated field. For example in Jan I had 141 refunds with total value of $23299. I expected to get $$165.24 in the calculate field but I get a DIV error. not sure why. No blanks in the dataset. How do I fix it? 

image

 

 
Posted : 02/04/2025 6:38 am
Riny van Eekelen
(@riny)
Posts: 1195
Member Moderator
 

@lizch

Can you please show us an example of your data and the formula used for the calculated field?

 
Posted : 02/04/2025 2:43 pm
(@lizch)
Posts: 3
Active Member
Topic starter
 

Thank you so much! I've attached a sample of the data and the pivot with the calculated field. 

image

 

 
Posted : 03/04/2025 1:31 am
Riny van Eekelen
(@riny)
Posts: 1195
Member Moderator
 

@lizch

All clear! The field "Booking ref" is a text. Although a pivot table can count the number of booking refs, you can't use that filed in a calculation. A workaround would be to add a column, call it "Count" filled with ones. Use that in the calculated field in stead.

See attached.

 

 
Posted : 03/04/2025 2:08 am
Alan Sidman
(@alansidman)
Posts: 223
Member Moderator
 

Since you did not provide expected results for your moving average, my results are done in Power Pivot with a measure.  See the attached file for the presentation and calculation.

 

 
Posted : 03/04/2025 2:15 am
(@lizch)
Posts: 3
Active Member
Topic starter
 

@Riny Thank you so much! No wonder my calculated field didn't work. 

@ alansidman - I hadn't worked with PowerPivot before but could replicate it. Thank you so much.

Appreciate both of your feedback!

 

 
Posted : 03/04/2025 4:15 am
Alan Sidman
(@alansidman)
Posts: 223
Member Moderator
 

You are welcome Elizabeth.

 
Posted : 03/04/2025 4:19 am
Share: