cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dskeane Frequent Visitor
Frequent Visitor

IF statement maybe?

Looking for some assistance handling an if statement.

 

Everything in the highlighted area works however returns a NaN if Labor total has $0.00 in the field. 

 

When adding the extra if statement "not highlighted" i keep getting an error. 

 

 

example, calculatedlabor total / est sw = value "this part works" only when the calulatedlabortotal is a $0.00 then it does not work, so I add another if condition to try resolve this issue. (hope this makes sense)

 

Appreciate any feedback. 

 

Capture.PNG

4 REPLIES 4
Super User
Super User

Re: IF statement maybe?

Nope, I don't get it. Sample data would be great to recreate. 

 

It looks like you are using AND incorrectly though.

 


I have book! Learn Power BI from Packt


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

Proud to be a Datanaut!

Super User
Super User

Re: IF statement maybe?

Hi,

 

Why are you using an AND function inside the IF function?  Also, is the calculatedlabourtotal column a text column.  If it is, then write "0", else just 0.

dskeane Frequent Visitor
Frequent Visitor

Re: IF statement maybe?

AND was added to try somethign different. 

 

I guess to keep this simple is there a certain way to handle 0 divided by  0 using an IF Statment to return a value of 0?

 

Right now I am getting NaN as the result.

 

 

 

 

mattbrice Senior Member
Senior Member

Re: IF statement maybe?


wrote:

AND was added to try somethign different. 

 

I guess to keep this simple is there a certain way to handle 0 divided by  0 using an IF Statment to return a value of 0?

 

Right now I am getting NaN as the result.

 

 

 

 


use DIVIDE function. 

 

Helpful resources

Announcements
Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Power BI Helps Homeless and Trouble Youth

Power BI Helps Homeless and Trouble Youth

We spoke with Power BI Super User, Greg Deckler, about his charity work

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 185 members 1,768 guests
Please welcome our newest community members: