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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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