Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi, I'm having trouble figuring out a simple bit of DAX logic.
I have two values reported at the branch level, which can in turn be aggregated to territories and regions. One value is only reported at some branches but is the preferred value, the other is reported at all branches. I want to create an "if preferred value present, sum preferred, else sum other" measure, such as
But doing it naively like this only works at the branch level and screws up at the aggregated territory/region level (because, in aggregate, the preferred value is almost always present).
Here, tricky_value is the one I want to sum when present:
Any insight is appreciated, and sorry if this has been posted but it was a tricky phrasing to search for.
Solved! Go to Solution.
@champioz First, please vote for this idea: https://ideas.powerbi.com/ideas/idea/?ideaid=082203f1-594f-4ba7-ac87-bb91096c742e
This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
Also: https://youtu.be/uXRriTN0cfY
And: https://youtu.be/n4TYhF2ARe8
Also this: Matrix Measure Total Triple Threat Rock & Roll - Microsoft Fabric Community
@champioz First, please vote for this idea: https://ideas.powerbi.com/ideas/idea/?ideaid=082203f1-594f-4ba7-ac87-bb91096c742e
This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
Also: https://youtu.be/uXRriTN0cfY
And: https://youtu.be/n4TYhF2ARe8
Also this: Matrix Measure Total Triple Threat Rock & Roll - Microsoft Fabric Community
Thanks! I knew it had to be a common issue I just couldn't think how to describe it well. Your first solution looks like it will work for me.
User | Count |
---|---|
93 | |
85 | |
78 | |
68 | |
63 |
User | Count |
---|---|
113 | |
99 | |
97 | |
64 | |
59 |