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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Hayleysea
Resolver II
Resolver II

Separate card % not adding up to 100%

I have four cards for different status types. Each are % of the total and technically all add up to 100% but because they are on separate cards and have 0 decimal places the rounding of each of them individually is causing them to not add up to 100%.

 

I want to put in a check to see if when the 0 decimal % on each card < 100 then to add 1% to one of the cards and if it = > 100% to minus 1% off one of the cards.

 

Example:

Status 1Status 2Status 3Status 4 
10%75%13%1%99%

 

What's the best way to do this?

1 ACCEPTED SOLUTION
AiolosZhao
Memorable Member
Memorable Member

Hi @Hayleysea ,

 

There is a way to solve this problem.

 

When you calculate the status 4, you can use the 1 - status 1 - status 2 - status 3.

 

Then I think you will get the result that you want.

 

Please remember that the status 1/2/3 should be round(status1/2/3,0) I think.

 

Please try.

Aiolos Zhao





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Hayleysea , this typical round off issue. Assume all four of them have values like this

10.2 , 75.3, 13.3, 1.2 . They will round off and you will lose  1.

 

There best way out is to have 1 decimal place. Or add a rounding error to one number.

AiolosZhao
Memorable Member
Memorable Member

Hi @Hayleysea ,

 

There is a way to solve this problem.

 

When you calculate the status 4, you can use the 1 - status 1 - status 2 - status 3.

 

Then I think you will get the result that you want.

 

Please remember that the status 1/2/3 should be round(status1/2/3,0) I think.

 

Please try.

Aiolos Zhao





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.