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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
alanshake23
Regular Visitor

Problem with total values within a table

I have a problem with my report. After running some tests, I noticed that the coverage percentage is considering surplus personnel. When I checked the surplus measurement, it doesn't subtract the assets that are considered surplus. The way it works is as follows:

If active personnel > authorized personnel, then it displays the result of the subtraction between authorized personnel and active personnel. Otherwise, it displays 0.

Can I share the PBIX

 

Heres an example: Apparently the surplus formula only works in the rows but not in the column totals.

alanshake23_0-1755035868849.png

 

 

 

1 ACCEPTED SOLUTION
MohamedFowzan1
Solution Specialist
Solution Specialist

Hi @alanshake23 

 

Try to have the surpluse logice within the measure.

 

Coverage % =

VAR Authorized = SUM('Table'[Autorizado])

VAR Active = SUM('Table'[Activos])

VAR Surplus = IF(Active > Authorized, Active - Authorized, 0)

VAR AdjustedActive = Active - Surplus

RETURN

DIVIDE(AdjustedActive, Authorized)

 

Please provide the expected output along with the screenshot if this doesnt work

View solution in original post

3 REPLIES 3
V-yubandi-msft
Community Support
Community Support

Hi @alanshake23 ,

I’ve updated the surplus and coverage logic so it now functions correctly for both individual rows and the totals. The calculations should now match your expectations, particularly regarding surplus personnel.

 

FYI:

Vyubandimsft_0-1755100361832.png

 

The PBIX file is attached for your review. If you notice anything unusual or need further adjustments, please let me know.

 

Regards,

Yugandhar.

MohamedFowzan1
Solution Specialist
Solution Specialist

Hi @alanshake23 

 

Try to have the surpluse logice within the measure.

 

Coverage % =

VAR Authorized = SUM('Table'[Autorizado])

VAR Active = SUM('Table'[Activos])

VAR Surplus = IF(Active > Authorized, Active - Authorized, 0)

VAR AdjustedActive = Active - Surplus

RETURN

DIVIDE(AdjustedActive, Authorized)

 

Please provide the expected output along with the screenshot if this doesnt work

Thanks man!!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.