cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted

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.

Capture.JPG

 

Please help.

 

Thanks,

Paruchuri

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
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?





Did I answer your question? Mark my post as a solution!


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




 




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. 

Capture.JPG 
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
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?





Did I answer your question? Mark my post as a solution!


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




 




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. 

Capture.JPG 
Now i have re-written the formula as below.

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

 

That solved my problem.