cancel
Showing results for
Did you mean:
Highlighted
Member

## Divide Function

Hi Community,

I'm trying to find a way to show the GP% 0 % when sales is 0%. Below is my formula.

GP % = IF([Sales]=0,0,DIVIDE( [GP],([Sales])))

I don't why its not working.

Thanks,

Paruchuri

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User

## Re: Divide Function

@paruchuri447 can you double check that your [sales] value is not exactly zero, may be it has more decimal places and doesn't make it zero.

On other note, are those measures or columns in your table?

Proud to be a Datanaut! Connect with me on Linkedin.
Feel free to email me with any of your BI needs.

Member

## Re: Divide Function

@parry2k  Thanks for the reply.  You were right they have values but i restrict the decimal values to 2 digit. Below is the screenshot of them. I don't them to change to Whole number as we need at least 2 decimal digits.

Now i have re-written the formula as below.

CY GP (KUSD) % = IF([Sales]<=0.005,0,DIVIDE( [GP],([Sales])))

That solved my problem.

2 REPLIES 2
Super User

## Re: Divide Function

@paruchuri447 can you double check that your [sales] value is not exactly zero, may be it has more decimal places and doesn't make it zero.

On other note, are those measures or columns in your table?

Proud to be a Datanaut! Connect with me on Linkedin.
Feel free to email me with any of your BI needs.

Member

## Re: Divide Function

@parry2k  Thanks for the reply.  You were right they have values but i restrict the decimal values to 2 digit. Below is the screenshot of them. I don't them to change to Whole number as we need at least 2 decimal digits.

Now i have re-written the formula as below.

CY GP (KUSD) % = IF([Sales]<=0.005,0,DIVIDE( [GP],([Sales])))

That solved my problem.