cancel
Showing results for
Did you mean:

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Frequent Visitor

## 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.

1 ACCEPTED SOLUTION
Community Champion

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.

8 REPLIES 8
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

Frequent Visitor

Nothing chages if I put alternate rezult 0 in Divide formula

Community Champion

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

Frequent Visitor

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!

Community Champion

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.

Frequent Visitor

My new formula:

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

Frequent Visitor

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):

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

Frequent Visitor

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

Announcements

#### Power BI Monthly Update - November 2023

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

#### Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

#### The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors