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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
GeorgeG
Helper I
Helper I

Percentages aren't calculating correctly

Hi, I have the below matrix table (cannot show first row, but it is an Account Name with Indiviaul Purchases underneath):

GeorgeG_1-1597398431556.png

The income percentage formula I used is DIVIDE( Income, Cost ). 

 

As you can see, they aren't calculating correctly. For example, the third row should show 23.86% but it is returning 28.76%. I have it set to show the Average, as this is the closest result. Does anybody have any idea what's causing this?

 

Thank you.

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @GeorgeG 

Just like  has replied, you need to build a measure. And you need if function to make your result see 0.

I build a table like yours.

1.png

Measure:

 

Income Percentage = 
VAR _A = DIVIDE(SUM('Table'[Income]),SUM('Table'[Cost]))
Return
IF(_A=0,0,_A)

 

Result:

 2.png

You can download the pbix file from this link: Percentages aren't calculating correctly

 

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Hi @GeorgeG 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your problem or share me with your pbix file from your Onedrive for Business.

 

Best Regards,

Rico Zhou

Hi,

 

I found the issue that was causing this. I have a rather large dataset in which the Account Names are connected to multiple figures underneath. It looks like it was calculating the percentage of other figures against the Account Name, to fix this I selected the following options within PowerBI:

 

GeorgeG_0-1598970301704.png

 

amitchandak
Super User
Super User

@GeorgeG , Can you share the formula,

 

hope it

divide(Sum(Table[Income]),sum(Table[Cost]))

 

not

average(divide((Table[Income]),(Table[Cost])))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak , the formula is as follows:

 

DIVIDE(
(Table[Income]),

(Table[Cost])

)

 

If I add SUM to the formula, the below is shown:

Screenshot_3.png

This is with the Average option selected, either option returns incorrect (If I use the SUM option, it shows over 300% for all rows):

Screenshot_2.png

Thank you.

 

 

 

Anonymous
Not applicable

Hi @GeorgeG 

Just like  has replied, you need to build a measure. And you need if function to make your result see 0.

I build a table like yours.

1.png

Measure:

 

Income Percentage = 
VAR _A = DIVIDE(SUM('Table'[Income]),SUM('Table'[Cost]))
Return
IF(_A=0,0,_A)

 

Result:

 2.png

You can download the pbix file from this link: Percentages aren't calculating correctly

 

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

@GeorgeG , Create a measure like

 

DIVIDE(
sum(Table[Income]),

sum(Table[Cost])

)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors