Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Dicken
Responsive Resident
Responsive Resident

Filer Context of a calculated column in a pivot table

 

  Hi,   I  have  a   Caluculated column  equivalent sumproduct ; 

 

 

 

 SUMX( Table1, Table1[Price]*Table1[Unit]) 

 

 

 

Fine, but when used in a pvot table I get back some very strange results,, so can someone explain or point to information 

on how these incorrect or at least unwanted results are  being calcuated, the actural result is 2267? 

Dicken_0-1719164518290.png

please don't suggest a measure, that will not help me unserstand whats happening here 🙄

 

Richard. 

 

 

 

1 ACCEPTED SOLUTION
NaveenGandhi
Super User
Super User

Hi @Dicken 

from what i understand, the pivot table is doing sum of the calculated column 1, Look at the below table and can you confirm that the  occurence of item in original table is equal to column D?  

 

NaveenGandhi_4-1719166025657.png

 


Let me know if this helps or feel free to share the sample file to have a look at.

 

If this post helps, then please consider Accept it as the solution to help the others find it more quickly. Appreciate you kudos!!

View solution in original post

5 REPLIES 5
Dicken
Responsive Resident
Responsive Resident

Hi, 
Thanks, that is whats happening,
Richard. 

lbendlin
Super User
Super User

Please provide sample data that fully covers your issue.
Please show the expected outcome based on the sample data you provided.

Dicken
Responsive Resident
Responsive Resident

Hi, I cna't do this right now, I acutually deleted the example, but tomorrow I will replicate it and do some counting, 
that does  seeem like the reason, it's a bit lke the average aggreation problem when you have duplicate rows, 
will let you know, thank you for replying , 
Richard 

rajendraongole1
Super User
Super User

Hi @Dicken -As you know, calculated columns are computed row-by-row and are static, meaning they don't change based on filters in the pivot table.

where as this could lead to unexpected results if the underlying data model or relationships are not correctly configured. as we need to verifying data and model relationships should help identify the issue.

If you need dynamic calculations based on the pivot table context, you would generally use measures, but as you've requested, this explanation focuses on understanding calculated columns..

 

if you are using the calculated column: directly you can use the calculation as below , no need to add sumx function.

 

Calculated Column = Table1[Price] * Table1[Unit]

 

as you mentioned the above expected result 2267possible issue with data , as i mentioned above   basically calculated columns do not change based on the filters or slicers applied in a pivot table. This means they are static once calculated, which might not reflect the desired behavior when interacting with other data.

while doing the pivot table is correctly aggregating the calculated column. 

Hope the above expaination is clear . 

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





NaveenGandhi
Super User
Super User

Hi @Dicken 

from what i understand, the pivot table is doing sum of the calculated column 1, Look at the below table and can you confirm that the  occurence of item in original table is equal to column D?  

 

NaveenGandhi_4-1719166025657.png

 


Let me know if this helps or feel free to share the sample file to have a look at.

 

If this post helps, then please consider Accept it as the solution to help the others find it more quickly. Appreciate you kudos!!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.