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
ritasweidy
Frequent Visitor

Total Percentage in Table not calculated correctly

Hello , 

 

Does anybody know how can i calculate the percentage column in order to show the right value in the Total in the "Table" View

 

Percentage = Difference / Last Year * 100

 

The Percentage on each row is working but when the "Table" is calculating the TOTAL Row, it is not calculating right

 

 

BranchLast YearCurrent YearDifferencePercentage
LB1500200050033.33%
QT200040002000100.00%
UA300032502508.33%
KA4000450050012.50%
Total1050013750325030.95%

 

 

 

 

1 ACCEPTED SOLUTION
Stachu
Community Champion
Community Champion

The numbers I see in your example are correct, or do you expect to see something else?
Assuming they're correct, and that's your expected output - in general the formula is correct, but will only work if you create measure, you will also need to aggregate the columns with SUM

Also I would suggest using DIVIDE, as it has the proper DIV/0 handling, so

PercentageMeasure=DIVIDE(SUM(Table[Difference]),SUM(Table[Last Year]))*100


Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

View solution in original post

1 REPLY 1
Stachu
Community Champion
Community Champion

The numbers I see in your example are correct, or do you expect to see something else?
Assuming they're correct, and that's your expected output - in general the formula is correct, but will only work if you create measure, you will also need to aggregate the columns with SUM

Also I would suggest using DIVIDE, as it has the proper DIV/0 handling, so

PercentageMeasure=DIVIDE(SUM(Table[Difference]),SUM(Table[Last Year]))*100


Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

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.