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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
mdhenzel
Frequent Visitor

Help with a measure for total value. It is not totaling out in the grand total correctly

Hi all,

 

I am having issues with a measure that is taking a column value and multiplying by a measure. The individual rows have come out correctly, but due to the way I have written the meausre, it isn't totaling correctly. In the below, the total value is taking the std. cost (a column) and multiplying against the total units (a measure). Issue is, the grand total. This version is using firstnonblank for std cost. If I use sum for std cost, the total comes out in the billions. it should be around 31 million. Any help? 

 

mdhenzel_0-1655215746751.png

 

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @mdhenzel 

 

You can try the following methods. IF(HASONEVALUE()) can control the output of Total value.

Measure

Total Value = 
IF (
    HASONEVALUE ( 'Table'[ID] ),
    SUM ( 'Table'[Std. Cost] ) * [Total Units],
    SUMX (
        SUMMARIZE (
            'Table',
            'Table'[ID],
            "Sum", SUM ( 'Table'[Std. Cost] ) * [Total Units]
        ),
        [Sum]
    )
)

vzhangti_0-1655449070422.png

Is this the result you expect?

 

For reference: Solved: How to find the sum of multiple averages - Microsoft Power BI Community

 

Best Regards,

Community Support Team _Charlotte

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

1 REPLY 1
v-zhangti
Community Support
Community Support

Hi, @mdhenzel 

 

You can try the following methods. IF(HASONEVALUE()) can control the output of Total value.

Measure

Total Value = 
IF (
    HASONEVALUE ( 'Table'[ID] ),
    SUM ( 'Table'[Std. Cost] ) * [Total Units],
    SUMX (
        SUMMARIZE (
            'Table',
            'Table'[ID],
            "Sum", SUM ( 'Table'[Std. Cost] ) * [Total Units]
        ),
        [Sum]
    )
)

vzhangti_0-1655449070422.png

Is this the result you expect?

 

For reference: Solved: How to find the sum of multiple averages - Microsoft Power BI Community

 

Best Regards,

Community Support Team _Charlotte

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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors