SOLVED

Calculated Field in Pivot Table Not Summing Correctly

%3CLINGO-SUB%20id%3D%22lingo-sub-2378076%22%20slang%3D%22en-US%22%3ECalculated%20Field%20in%20Pivot%20Table%20Not%20Summing%20Correctly%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2378076%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%2C%20all.%20I%20have%20a%20pivot%20table%20that%20has%20a%20calculated%20field%20in%20the%20last%20column%20of%20the%20pivot%20table.%20The%20formula%20I%20am%20using%20is%20an%20IF%20formula%20to%20determine%20Full%20Time%20Equivalents.%20I%20was%20hoping%20it%20would%20add%20the%20FTE's%20and%20give%20me%20a%20total%20at%20the%20bottom%20but%20it%20just%20says%20%221%22%20in%20the%20grand%20total%20section.%20It%20should%20say%2091.%20Any%20thoughts%20on%20how%20(or%20if)%20I%20can%20correct%20this%3F%20Thank%20you!%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%20(125)_LI.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F282848iC515BE93FED6C051%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot%20(125)_LI.jpg%22%20alt%3D%22Screenshot%20(125)_LI.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2378076%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2378092%22%20slang%3D%22en-US%22%3ERe%3A%20Calculated%20Field%20in%20Pivot%20Table%20Not%20Summing%20Correctly%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2378092%22%20slang%3D%22en-US%22%3EAn%20image%20doesn't%20really%20show%20much%20other%20to%20help%20in%20diagnosis....is%20it%20possible%20for%20you%20to%20post%20a%20copy%20of%20the%20actual%20spreadsheet%2C%20just%20omitting%20real%20names%20of%20real%20people%20(and%20any%20other%20identifiable%20data)%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2378105%22%20slang%3D%22en-US%22%3ERe%3A%20Calculated%20Field%20in%20Pivot%20Table%20Not%20Summing%20Correctly%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2378105%22%20slang%3D%22en-US%22%3ERight-click%20PivotTable%20%7C%20Refresh%2C%20maybe%3F%20It's%20difficult%20to%20say%20without%20seeing%20the%20workbook.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2378125%22%20slang%3D%22en-US%22%3ERe%3A%20Calculated%20Field%20in%20Pivot%20Table%20Not%20Summing%20Correctly%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2378125%22%20slang%3D%22en-US%22%3EIt%20occurs%20to%20me%20to%20ask%20also%20what%20the%20IF%20formula%20is%20testing%20for%2C%20and%20what%20its%20result%20is%20in%20connection%20with%20the%20FTE%20question.%20But%20truly%2C%20most%20helpful%3A%20post%20the%20actual%20workbook%2C%20devoid%20of%20confidential%20data.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2378127%22%20slang%3D%22en-US%22%3ERe%3A%20Calculated%20Field%20in%20Pivot%20Table%20Not%20Summing%20Correctly%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2378127%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F676026%22%20target%3D%22_blank%22%3E%40slohombre%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWith%20calculated%20field%20in%20total%20PivotTable%20uses%20the%20same%20formula%20as%20for%20the%20rows%2C%20not%20sum%20them.%20Thus%20if%20your%20IF()%20applied%20to%20totals%20returns%201%2C%20in%20grand%20total%20for%20FTE%20will%20be%201.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20such%20calculations%20it's%20better%20to%20add%20data%20to%20data%20model%20creating%20PivotTable%20and%20use%20DAX%20measures%20for%20aggregations.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2378135%22%20slang%3D%22en-US%22%3ERe%3A%20Calculated%20Field%20in%20Pivot%20Table%20Not%20Summing%20Correctly%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2378135%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3BWould%20SUMX%20be%20the%20right%20DAX%20formula%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

 

Hi, all. I have a pivot table that has a calculated field in the last column of the pivot table. The formula I am using is an IF formula to determine Full Time Equivalents. I was hoping it would add the FTE's and give me a total at the bottom but it just says "1" in the grand total section. It should say 91. Any thoughts on how (or if) I can correct this? Thank you!

Screenshot (125)_LI.jpg

6 Replies
An image doesn't really show much other to help in diagnosis....is it possible for you to post a copy of the actual spreadsheet, just omitting real names of real people (and any other identifiable data)?
Right-click PivotTable | Refresh, maybe? It's difficult to say without seeing the workbook.
It occurs to me to ask also what the IF formula is testing for, and what its result is in connection with the FTE question. But truly, most helpful: post the actual workbook, devoid of confidential data.
best response confirmed by slohombre (Contributor)
Solution

@slohombre 

With calculated field in total PivotTable uses the same formula as for the rows, not sum them. Thus if your IF() applied to totals returns 1, in grand total for FTE will be 1.

 

For such calculations it's better to add data to data model creating PivotTable and use DAX measures for aggregations.

@Sergei Baklan Would SUMX be the right DAX formula?

@slohombre 

Perhaps, it's hard to say without knowing the model. Here When to Use SUM() vs SUMX() - Excelerator BI is the great post which explains and demonstrates difference between SUM and SUMX