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
kunwar2
New Member

Help with SUMX DAX

I've been working on a Finance PVM (Price Volume Mix) Analysis in PowerBI and have been stuck with a SUMX DAX measure that doesn't return the intended value.
I have tried multiple way-outs and even brought the semantic model in a flat file to simplify things but still no resolution.

The model has Region and product hierarchies against which we have Sales, Units, and SGP for various scenarios. The visual has parameters that allow users to select scenarios selections (Actual/Forecast/Plan) which are then linked to measures.

And then there are a few calculated measures to calculate contributions of Sales and SGP of each SKU to total Sales and there are deltas between scenarios to calculate Mix.
The product of Sales Contribution Delta and SGP contribution Delta gives a Mix Factor, which is then multiplied by Total Sales to give Mix $.

This Mix$ is the right value when I see it at the lowest level of the product hierarchy; however, as soon as I use SUMX to achieve Mix$ for level 2 of the product hierarchy it does not sum and gives methe  wrong value or zero.

I can share some files if you could help with this.
I've been stuck with this for far too long.

Any help would be appreciated.

1 REPLY 1
amitchandak
Super User
Super User

@kunwar2 , Not very clear. But make sure you measure is like

 

Sumx(Summarize(Fact, Dim[Col], Dim2[Col]), [Measure1]*[Measure2])

 

In it from two fact and across different dimesions 

 

Sumx(Values(Dim[Col]), calculate(Sumx(Values(Dim2[Col]), [Measure1]*[Measure2]) ) )

 

You can use isinscope to change calculation for different level

example

How to Switch Subtotal and Grand Total in Power BI | Power BI Tutorials| isinscope: https://youtu.be/smhIPw3OkKA

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.