The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
TL;DR: measure is correct at the lowest row, but rollup is wrong.
I have a series of dependent measures that cross 3 intermediate 1:many tables. All tables have static data, but I'm using measures so users can select rows in the yellow table and see the resulting measure in the blue table. The connecting measures (green, pink, and orange) use multiplying operations because I'm compounding probabilities of different scenarios.
Measures calculations:
The measure works correctly at the row-level of the blue table. I would like to be able to group via a matrix visual by the two far-left tables, but the rollups are incorrect. I will never use the rollups of the intermediate orange, pink, or green measures; they are all the product of the rollups. For example, for the revenue orange rollup, it would be 0.0000079%=(.017*.035*.042*.0504*.063). I would like rollups of the blue to be a (scaled) sum of the blue rows - in this case, maybe 13k. What happens instead is that the rollup is the same math, except applied only with the rollup numbers: almost 0.
As long as I'm dreaming big, I'd also like to scale the blue rollup, because the cost of several scenarios occuring is less than the sum of each individually happening. maybe rollup = maxx(costs) * sum(1+ individual_cost/((.25 + indidual_cost/maxx(costs)).
Any ideas?
Solved! Go to Solution.
@DylanEvans 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
Figured it out. I was summarizing by the wrong field.
@DylanEvans 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
That sounds like exactly the issue and your solution even gives me the flexibility to scale the summing.
New measure:
this_cost_total =
VAR _table = summarize('product-risks','product-risks'[risk],"_value",[this_cost])
RETURN
IF(HASONEVALUE('product-risks'[risk]),[this_cost],sumx(_table,[_value]))
@Greg_Deckler Unfortunately, the solution didn't seem to work for me: the new measure has the same rollups as the original row-level.
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
31 | |
11 | |
10 | |
10 | |
9 |