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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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