Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I'm working on a pricing analysis for my company which consists of two sets of invoice fact data joined to by multiple dimension tables. The goal is to be able to select a base year + base period (BP) and a compare/current year + compare/current period (CP) and see our price traction, volume traction, etc. We compare pricing etc. on a customer + item SKU level because different customers can have different pricing models.
My CEO requested a small change to the volume traction calculation that is throwing me for a loop. The original scope of the report is that we would only compare Base to current if a match existed. Meaning if a customer bought something in the base period, but then didn't buy it in the current period, we would exclude those records. Because of this I was able to do some simple SumX calculations only looking at the current period like this:
Volume traction V2 is just my attempt to put everything from Volume Traction + Volume traction $ into one step:
Any help would be greatly appreciated! This is the first time I've run into something like this and it's driving me nuts!
Solved! Go to Solution.
So I've figured out the solution. SUMX doesn't like to be in an if statement. I assumed the SumX's would work together to give me what I want but I was incorrect. In order to rectify what was happening, I needed to make a measure specifically looking at the base period sales that weren't being included.
In the end I had to do this:
Equation 1 I didn't update from last time:
Equation 2 breaks out the base period values from equation 1 into its own measure:
And equation 3 adds together equation 1 + equation 2 to give me the proper totals and line level information
So I've figured out the solution. SUMX doesn't like to be in an if statement. I assumed the SumX's would work together to give me what I want but I was incorrect. In order to rectify what was happening, I needed to make a measure specifically looking at the base period sales that weren't being included.
In the end I had to do this:
Equation 1 I didn't update from last time:
Equation 2 breaks out the base period values from equation 1 into its own measure:
And equation 3 adds together equation 1 + equation 2 to give me the proper totals and line level information
Can you please share your pbix file ?
Unfortunately I'm unable to since it contains sensitive information. I can however attach an excel file with some sample data, the visual, the equations, and more descriptions of the issue i'm running into. What would be the best way to do that?
Maybe it is better to share the pbix file containing the model with sample data.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
90 | |
89 | |
79 | |
70 | |
68 |
User | Count |
---|---|
226 | |
129 | |
119 | |
84 | |
77 |