Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Good morning,
Goal: Trying to create a DAX measure that will calculate the % of Total when I am expanding down my hiearchy.
Details: I have two dimensions on my hiearchy. When I drill down to the more granular dimension, I'd like to see the % of total calculate - but it's just defaulting to 100%. The image below may explain it better. What I'd like to see, in the image below, row 2 'Target Retirement 2015 Fund' to be ~1.07% [$93,710,129 / $8,739,871,887 = ~1.07%].
Current Measure that does NOT work:
*Field: 'Plan Name Level 1' is the higher level & is part of the hierarchy
Solved! Go to Solution.
Update: I have figured out the solution curtiousy of SQL BI support:
https://www.sqlbi.com/articles/clever-hierarchy-handling-in-dax/
The solution is this measure:
I've actually done something like this but with a date hierarchy thanks to this article. Here's the measure I came up with for you. I think I got it right but without your file I couldn't really duplicate your data the same way, but it should work. Hope this helps.
% of Plan Assets = VAR lvl1_margin = DIVIDE( [Asset AUM] ,CALCULATE( [Asset AUM] ,ALLEXCEPT( 'Plans' ,'Plans'[1st lvl row] ) ) ) VAR lvl2_margin = DIVIDE( [Asset AUM] ,CALCULATE( [Asset AUM] ,ALLEXCEPT( 'Plans' ,'Plans'[1st lvl row] ,'Plans'[2nd lvl row] ) ) ) VAR result = IF( lvl1_margin = 1 ,lvl2_margin ,lvl1_margin ) RESULT CALCULATE( result ,ALLSELECTED('Plans') )
Update: I have figured out the solution curtiousy of SQL BI support:
https://www.sqlbi.com/articles/clever-hierarchy-handling-in-dax/
The solution is this measure:
Sad, I just posted and your solution post pops up
@Drewdel Thank you very much for taking the time & energy to help me with my problem. I do appreciate it. I've tried your solution and I'll need to play with it some more to get it to work correctly, but you are definiately close. Thanks again.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |