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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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
Top Kudoed Authors