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
Justas
Advocate I
Advocate I

Gross Margin after dividing returns enormous number

Hello,

 

I use dax Gross profit margin =Divide (Gross profit, Income)*100 formula. My income is zero in Month of May. After division returns enormous number. Gross Margin May.jpg

1 ACCEPTED SOLUTION

Try using the ROUND function on your fields before dividing.  Or alternatively do the rounding in Power Query so they're stored with the right number of significant digits.

View solution in original post

8 REPLIES 8
dedelman_clng
Community Champion
Community Champion

Hi @Justas -

 

DIVIDE has a 3rd parameter, which you set the value if the result would otherwise throw an error.

 

Gross profit margin =Divide (Gross profit, Income, 0)*100

 

Hope this helps

David

Nothing chages if I put alternate rezult 0 in Divide formula

Sorry, I read the question wrong.

 

Check your data that Income is actually 0.  Often times when things are sourced from Excel or other financial applications, what looks to be 0 will be something like 1.2e-6 (.00000012) which rounds to 0 in 2 decimal places but isn't 0.

 

In your case Income would be approx 4.5e-7 (0.000000045) based on the results shown.

 

Hope this helps

David

In excel Credit-Debit shows 0,00E+00, but then calculates margin denominator (income) seems to be not equal to zero. I do not know what to do!

Try using the ROUND function on your fields before dividing.  Or alternatively do the rounding in Power Query so they're stored with the right number of significant digits.

My new formula:

 

Gross profi margin %=Divide([Gross Profit],round([Revenue],2))*100

In excel mannualy made decimal places to check if any other numbers after comma not equal to 0.  Income calculates Credit-Debit and result from operatios equals to zero (see difference below):

Justas_0-1624338193778.png

Is any formula or method in excel to check that data is really 0?

 

In  Query I found last decimal space with number 7, but in excel shows 8873,2000000000. What to do 😞 ?

Justas_0-1624363497935.png

 

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.

Top Solution Authors