Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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
Solved! Go to Solution.
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.
In the visualizations pain change Total value to 'show value as percenetage of grand total'
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.
but how to take percentage of both
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])))
i got this
Format the measure as %
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.
User | Count |
---|---|
102 | |
91 | |
87 | |
79 | |
71 |
User | Count |
---|---|
113 | |
105 | |
101 | |
75 | |
64 |