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

View all the Fabric Data Days sessions on demand. View schedule

Reply
veshva40
Regular Visitor

Help with Divide Function (total percentage)

Hi everyone, I’m having some trouble calculating percentages in Power BI. As you can see in the image below, I want it to show the percentage of completion for each batch separately. But right now, the formula I’m using is calculating the overall percentage for all three batches instead of doing it per batch.

Any ideas on how to fix this?

 

Current outcome

veshva40_0-1762347479115.png

Expected outcome

veshva40_1-1762347526328.png

 

Thank you

1 ACCEPTED SOLUTION
MasonMA
Community Champion
Community Champion

It looks like a syntax error in your SUM(). It's missing a bracket after 'Table1'[TOTAL]. 
Try this instead. 

Total% =
DIVIDE(
'Table1'[TOTAL],
CALCULATE(
SUM('Table1'[TOTAL]),
ALLEXCEPT('Table1', 'Table1'[Batch])
)
)

View solution in original post

4 REPLIES 4
Praful_Potphode
Solution Sage
Solution Sage

Hi @veshva40 ,

try creating below measure:

percentage = DIVIDE(
     SUM(Demo[Total Person]),
     CALCULATE(SUM('Demo'[Total Person]),ALLEXCEPT('Demo','Demo'[Batch]))
)

 

Please Give Kudos or mark it as solution once confirmed.

 

Thanks and Regards,

Praful

veshva40
Regular Visitor

Thank you for your advice. Based on your reply, I tried below computation but it throws me error 'too many arguments were passed to the SUM function. The maximum argument count for this function is 1.

 

Total% = DIVIDE('Table1'[TOTAL],CALCULATE(SUM(Table1[TOTAL],ALLEXCEPT(Table1,Table1[Batch]))))
MasonMA
Community Champion
Community Champion

It looks like a syntax error in your SUM(). It's missing a bracket after 'Table1'[TOTAL]. 
Try this instead. 

Total% =
DIVIDE(
'Table1'[TOTAL],
CALCULATE(
SUM('Table1'[TOTAL]),
ALLEXCEPT('Table1', 'Table1'[Batch])
)
)

MasonMA
Community Champion
Community Champion

Hi, 

 

I assume your current Measure probably looks like 
Total % = DIVIDE([Total Person], CALCULATE(SUM('Table'[Total Person]), ALL('Table'))) ?

If so, it removes all filters, including the Batch filter so the denominator is the grand total of all batches.

Try updating your denominator to 
CALCULATE(
SUM('Table'[Total Person]),
ALLEXCEPT('Table', 'Table'[Batch])
)

so that it removes all filters except the batch.

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