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
RPAI2812
Helper I
Helper I

Measure showing different sum result with multiple selection

I have a measure that associates the daily rate of a contract and the actual use of that contract in a month.

Measure 1: Day rate (USD/day) = SUMX('Table 1','Table 1'[Day Rate])
Measure 2: Used days (day) = 
SUMX('Table 1','Table 1'[Used days])
Measure 3: Rate cost = [Day rate (USD/day)]*[Used days (day)]

I have different contracts and when I select them individually I have the correct rate cost. However, when I multiple select contracts in the slicer, the results is NOT summing correctly the rate cost.
For instance:
Contract 1 rate cost = 100K USD
Contract 2 rate cost = 200K USD
Contract 1 + Contract 2 rate cost should be 300K USD, but it shows a different result.

Where am I making a mistake?
 
1 ACCEPTED SOLUTION
SteveHailey
Solution Specialist
Solution Specialist

Hey @RPAI2812.


Try: 

 

 

Rate Cost =
SUMX (
    'Table 1',
    'Table 1'[Day Rate] * 'Table 1'[Used Days]
)

 


That will go row by row and multiply the rate times the days, and then sum those values, which is correct.


Your measures are instead summing the rates, summing the days, and then multiplying those two sums together, which is incorrect.

View solution in original post

1 REPLY 1
SteveHailey
Solution Specialist
Solution Specialist

Hey @RPAI2812.


Try: 

 

 

Rate Cost =
SUMX (
    'Table 1',
    'Table 1'[Day Rate] * 'Table 1'[Used Days]
)

 


That will go row by row and multiply the rate times the days, and then sum those values, which is correct.


Your measures are instead summing the rates, summing the days, and then multiplying those two sums together, which is incorrect.

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.