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
Anonymous
Not applicable

Need Help Measure SUMX with worng Total

Hello dear Community,

 

Could you help me check why my total doesn't return the right result please?

From the column Potential $, I want to return the total and it should be 2477508 but my total from this cololumn is 2259259 (coming from 1.07*2104791).

 

Thanks a lot for your help.
Best regards,

 


This is my Measure: 

Measure Potential $ =

var avg_potential=[Volume]*[Average 3]

return

 

if(

HASONEVALUE(Plant[Unit]),

avg_potential,

SUMX(values('Table Plant[Unit]),avg_potential))

 

 
 
UnitVolumeAverage 3Potential $ 
A15255141,73908860 
A21614691,91309002 
A31215421,85225162 
A42072230,87181102 
A51096611,15126602 
A61446640,80115472 
A71374940,84115384 
A81187830,94111785 
A9815021,26102720 
A102122060,4493834 
A11882851,0390888 
A12788920,9071214 
A131175560,2225483 
 SumAverageSum 
Total21047911,072259259Wrong result from measure
 SumAverageSum 
Total21047911,072477508Right result
5 REPLIES 5
Anonymous
Not applicable

This is your measure:

[Measure Potential $] =
    SUMX(
        VALUES( 'Table Plant'[Unit] ),
        [Volume] * [Average 3]
    )

You have to remember that variables, once set, are STATIC.

 

Best

D

Anonymous
Not applicable

Hello @Anonymous , Thanks for the reply but it doesn't work either.

Still get the same result 😞

 

1.PNG2.PNG3.PNG

I am getting the correct result, looks like your multiplication in the origianl post is incorrect.

harshnathani
Community Champion
Community Champion

Hi @Anonymous ,

 

Try this measure

 

Measure Potential $ =
VAR avg_potential = [Volume] * [Average 3]
RETURN
    IF (
        HASONEVALUE ( Plant[Unit] ),
        SUMX (
            'Table Plant',
            avg_potential
        ),
        SUMX (
            VALUES ( 'Table Plant'[Unit] ),
            avg_potential
        )
    )

 

 


Regards,

Harsh Nathani


Appreciate with a Kudos!! (Click the Thumbs Up Button)

Did I answer your question? Mark my post as a solution!

 

 

Anonymous
Not applicable

Hi @harshnathani  , thanks for your reply but it unfortunately doesn't work.

I end up with the same result at the end 😞 

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.

Top Solution Authors