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
calexander24
Frequent Visitor

Calculating the Sum of Measures by customer

I am trying to calculate the sum of each customer value (Measure 4 & 5) however, the measure sums are giving a calculation based off all of the data. I have tried a combination of SUMX and Group by but still unable to get a total value that shows the sum of  measure 4 and 5 for each customer.

 

So in the example below I want to have a data card that shows the sum of measure 4 as it displays in the matrix.   The only other filter I for my page is a month filter. 

 

Customer NameMeasure 1Measure 2Measure 3Measure 4 Measure 5
Customer 1                       23.0                          20.0                                 8.0                           (187.0)      (200.0)
Customer 2                       24.0                          22.0                                 6.0                              (99.0)               -  
Customer 3                       12.0                          15.0                                 3.0                              (65.0)      (250.0)
Customer 4                       10.0                             6.0                                 1.0                              (80.0)               -  
   Sum of the Customer                           (431.0)      (450.0)
   what my data shows                           (403.0)      (350.0)
1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @calexander24 ,

 

Try to create another two measures based on Measure 4 and Measure 5 like below:

Measure 4_2 = SUMX( VALUES ( 'YourTable'[Customer Name] ), [Measure 4] )
Measure 5_2 = SUMX( VALUES ( 'YourTable'[Customer Name] ), [Measure 5] )

 

If this does not work, show me some sample data for test.

 

Reference:

How to provide sample data in the Power BI Forum - Microsoft Power BI Community

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
calexander24
Frequent Visitor

Thank you! This is what I needed and got it to work. I appreciate your help with this. 

Icey
Community Support
Community Support

Hi @calexander24 ,

 

Try to create another two measures based on Measure 4 and Measure 5 like below:

Measure 4_2 = SUMX( VALUES ( 'YourTable'[Customer Name] ), [Measure 4] )
Measure 5_2 = SUMX( VALUES ( 'YourTable'[Customer Name] ), [Measure 5] )

 

If this does not work, show me some sample data for test.

 

Reference:

How to provide sample data in the Power BI Forum - Microsoft Power BI Community

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.