Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Power_Guy
Frequent Visitor

Percentage Calculation Dax

Power_Guy_0-1722449500668.png


Hi Team,

I Need a Dynamic dax, we have two dimensional level of data(Dimension field) one is account that is first and credit that is second level
That should return % of platform measure in two different ways
 
1.i want to  divide credit value with total of commingid
this is the same way for second level categories for eg.
Private equity in coming id category
24324.95/242531.38 *100  = 10.02% (Same way need to calculate for entire as dynamic )
 
2. I want to calculate percetage of line total with grand total
For eg . Commingid category total line value is 242,531.38
Divide(242531.38,337,045.61) *100 = 7.9%
 
this 337,045 is grand total is in down



I need Help on to achive this , Expecting more suggestions here


1 ACCEPTED SOLUTION
Anonymous
Not applicable

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

vcgaomsft_0-1722477214446.png

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

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

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

vcgaomsft_0-1722477214446.png

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,

Power_Guy_0-1722486514904.png

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

Anonymous
Not 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.

vcgaomsft_0-1722506455966.png

% 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
__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

adudani
Super User
Super User

Hello,

Kindly provide the sample input/output in a usable format (excel, csv, table etc.) masking sensitive information.

reference : https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447... 

Thanks,

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a Kudos 🙂
Kind Regards,
Avinash

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.