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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Power_BI_Adapt
Resolver I
Resolver I

How to calculate column total value by making use of measure to calculate row totals?

Dear All,

 

I face the following situation:

 

Power_BI_Adapt_0-1670927899651.png

Total column is calculated by making use of the following measure: 

 

CALCULATE(sum('Table 1'[Number sold]))* sum('Table 1'[Unit price])

 

However to get a total row of this 'Total 'column the measure is still executing its logic, resulting in a wrong total of the 'Total' column. In example: result is 234  (13 * 18), but should be 87 (sum of the values in the three rows). 

 

Any suggestion to fix?

 

Kind regards,

1 ACCEPTED SOLUTION
AntonioM
Solution Sage
Solution Sage

Hi @Power_BI_Adapt ,

 

Please try this measure

 

SUMX( 'Table 1', 'Table 1'[Number sold] * 'Table 1'[Unit price] )

 

 

This will sum up one row at a time the calculation.

View solution in original post

1 REPLY 1
AntonioM
Solution Sage
Solution Sage

Hi @Power_BI_Adapt ,

 

Please try this measure

 

SUMX( 'Table 1', 'Table 1'[Number sold] * 'Table 1'[Unit price] )

 

 

This will sum up one row at a time the calculation.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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