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

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.

Reply
AtchayaP
Helper V
Helper V

Dax

Name.             Value 

Xxx.                 1806

Yyy.                    341

Zzz.                    236

 

This is my table I want to calculate %of value using dax..can anyone let me know how to calculate 

2 ACCEPTED SOLUTIONS

Hi @AtchayaP 

Could you try this instead (I replaced the ALL('Table (2)' [Name]), with [Value])

PercGT = DIVIDE(SUM('Table (2)'[Value]),CALCULATE(SUM('Table (2)'[Value]),ALL('Table (2)'[Value])))

In my test envrionment this has worked for me.

View solution in original post

v-xiaotang
Community Support
Community Support

Hi @AtchayaP 

Thanks for reaching out to us.

You can try this measure

% = DIVIDE(MIN('Table'[Value]),SUMX(ALL('Table'),'Table'[Value]))

in this measure,  MIN('Table'[Value]) will return the value of current row, SUMX(ALL('Table'),'Table'[Value]) will return the total= 1806+341+236.

so for row 1, %= divide(1806, (1806+341+236)) = 0.76, then you can format it as percentage by clicking on % button.

vxiaotang_0-1656384985722.png

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
jaleelahammed
Regular Visitor

jaleelahammed_0-1666597273205.png

In the visualizations pain change Total  value to 'show value as percenetage of grand total'

v-xiaotang
Community Support
Community Support

Hi @AtchayaP 

Thanks for reaching out to us.

You can try this measure

% = DIVIDE(MIN('Table'[Value]),SUMX(ALL('Table'),'Table'[Value]))

in this measure,  MIN('Table'[Value]) will return the value of current row, SUMX(ALL('Table'),'Table'[Value]) will return the total= 1806+341+236.

so for row 1, %= divide(1806, (1806+341+236)) = 0.76, then you can format it as percentage by clicking on % button.

vxiaotang_0-1656384985722.png

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

1656604714351593994718672721415.jpg

 but how to take percentage of both 

Seanan
Solution Supplier
Solution Supplier

Hi @AtchayaP 

You can use this measure to get the grant total percentage value

PercGT = DIVIDE(SUM('Table (2)'[Value]),CALCULATE(SUM('Table (2)'[Value]),ALL('Table (2)'[Name])))

16560181696537398629822720853293.jpg

 i got this

Format the measure as %


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi @AtchayaP 

Could you try this instead (I replaced the ALL('Table (2)' [Name]), with [Value])

PercGT = DIVIDE(SUM('Table (2)'[Value]),CALCULATE(SUM('Table (2)'[Value]),ALL('Table (2)'[Value])))

In my test envrionment this has worked for me.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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