Forum Discussion
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
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.
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.
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.
7 Replies
- v-xiaotangCommunity 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.
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.
- AtchayaPHelper V
but how to take percentage of both
- jaleelahammedRegular Visitor
In the visualizations pain change Total value to 'show value as percenetage of grand total'