Forum Discussion
Percentage Calculation Dax
- Anonymous2 years ago
Hi Power_Guy ,
Please create a new measure like:
% of Platform = VAR __cur_value = SUM('Table'[AUM]) VAR __total_commingid = CALCULATE(SUM('Table'[AUM]),ALLEXCEPT('Table','Table'[Account])) VAR __grand_total = CALCULATE(SUM('Table'[AUM]),ALL('Table'[Account])) VAR __result = IF( ISINSCOPE('Table'[Credit]), DIVIDE(__cur_value,__total_commingid), DIVIDE(__cur_value,__grand_total)) RETURN __resultBest Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi Power_Guy ,
Please create a new measure like:
% of Platform =
VAR __cur_value = SUM('Table'[AUM])
VAR __total_commingid = CALCULATE(SUM('Table'[AUM]),ALLEXCEPT('Table','Table'[Account]))
VAR __grand_total = CALCULATE(SUM('Table'[AUM]),ALL('Table'[Account]))
VAR __result = IF( ISINSCOPE('Table'[Credit]), DIVIDE(__cur_value,__total_commingid), DIVIDE(__cur_value,__grand_total))
RETURN
__result
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi Anonymous
Thank you so much for the idea,
I have applied the same logic which u sugested but still some values are not matching
while calculting second level values it is showing wrong values
- Anonymous2 years agoNot applicable
Hi Power_Guy ,
In the first screenshot you gave this part of the result seems to be correct. You just need to replace this part of the code with the code that was calculated at first time.% of Platform = VAR __cur_value = SUM('Table'[AUM]) VAR __grand_total = CALCULATE(SUM('Table'[AUM]),ALL('Table'[Account])) VAR __result = IF( ISINSCOPE('Table'[Credit]),<This part of the dax code needs to be replaced>, DIVIDE(__cur_value,__grand_total)) RETURN __resultBest Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum