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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Take the sum of a measure

Categorymeasure calculatedWhat i Want
CC1010/39
DC1212/39
MC99/39
VC88/39
Total391

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

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @Anonymous 

Try like:

Pecent = DIVIDE([Measure Calculate], CALCULATE([Measure Calculated], ALL()))

View solution in original post

3 REPLIES 3
Mahesh0016
Super User
Super User

Mahesh0016_0-1671009145720.png

 @Anonymous 

TomasAndersson
Solution Sage
Solution Sage

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])
)
FreemanZ
Super User
Super User

hi @Anonymous 

Try like:

Pecent = DIVIDE([Measure Calculate], CALCULATE([Measure Calculated], ALL()))

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors