Forum Discussion
veshva40
9 months agoRegular 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, t...
- 9 months ago
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
9 months agoSuper User
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.