Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Category | measure calculated | What i Want |
CC | 10 | 10/39 |
DC | 12 | 12/39 |
MC | 9 | 9/39 |
VC | 8 | 8/39 |
Total | 39 | 1 |
Good morning All,
I created a simple measure , and i would like to divide each value by the grand total for each category such that i can get the value in %.
exemple above(table).
How can i divide each line by the total .
I tried Calculate ( [measure calculated], filter'table','table'[category] ="CC") / [Measure calculated].
the formula is not working.
Best regards,
AK
Solved! Go to Solution.
hi @Anonymous
Try like:
Pecent = DIVIDE([Measure Calculate], CALCULATE([Measure Calculated], ALL()))
@Anonymous
Hi!
You have the right idea in your measure, but it's the other way around.
So the context in each row will automatically change to the current Category (CC, DC and so on), the measure will be calculated based on the Category in the current row, so your first FILTER() is not needed. However, you need to add a filter so that it calculates the Grand Total and not the sum of the measure in the current row context.
Try
What you want =
DIVIDE(
[Measure],
CALCULATE(
[Measure],ALLSELECTED('Table'[Category])
)
hi @Anonymous
Try like:
Pecent = DIVIDE([Measure Calculate], CALCULATE([Measure Calculated], ALL()))