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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
SK1968
New Member

Total of a calculated column is not correct when I sum in table visual

Please can anyone help as I have a problem with the sum of a calculated column not being correct when I put into a table visual.

 

The calculated column has been added to a calculated table 'Universal hours' and is labelled 'unused hours' - I want to have a visual where I have the total of 'unused hours'.

When I add to table as 'Sum of unused hours' the sum is incorrect

 

1 ACCEPTED SOLUTION
BeaBF
Super User
Super User

@SK1968 Hi!

This issue occurs because calculated columns in Power BI are evaluated row by row in the context of the calculated table. The sum displayed in your table visual might seem incorrect because of how Power BI aggregates data, especially when relationships and filters are applied.

To fix this, you can use a measure instead of relying on the aggregation of a calculated column. Measures are dynamic and respect the filter context of your visuals.

 

So, create a measure:

Total Unused Hours = SUM('Universal hours'[unused hours])

 

BBF

View solution in original post

3 REPLIES 3
BeaBF
Super User
Super User

@SK1968 Hi!

This issue occurs because calculated columns in Power BI are evaluated row by row in the context of the calculated table. The sum displayed in your table visual might seem incorrect because of how Power BI aggregates data, especially when relationships and filters are applied.

To fix this, you can use a measure instead of relying on the aggregation of a calculated column. Measures are dynamic and respect the filter context of your visuals.

 

So, create a measure:

Total Unused Hours = SUM('Universal hours'[unused hours])

 

BBF

Thank you very much - easy now I know

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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