Forum Discussion
Newbie Alert: If Statement between two number columns
Hi All
I was tring to add a new column with a very simple Goal - If estimated costs is less than or equal to Actual Cost then its green ; otherwise red.
I know below (Fig 1) shows equal too however i cant get anythng working and I cant see whats wrong?
Appreciate any advice.
Jimmy
Cost RAG = PMO[Estimated Labour Cost - Widget Project Board] = PMO[Actual Labour Cost to Date - Widget Project Board],"Green","Amber")
Fig 1
Hey Anonymous,
try the DAX below to create a calculated column:
Cost RAG = IF( PMO[Estimated Labour Cost - Widget Project Board] <= PMO[Actual Labour Cost to Date - Widget Project Board],"Green","Amber" )Hopefully, this provides what you are looking for.
Regards,
Tom
2 Replies
- TomMartens
Super User
Hey Anonymous,
try the DAX below to create a calculated column:
Cost RAG = IF( PMO[Estimated Labour Cost - Widget Project Board] <= PMO[Actual Labour Cost to Date - Widget Project Board],"Green","Amber" )Hopefully, this provides what you are looking for.
Regards,
Tom
- AnonymousNot applicable
TomMartens Would you believe me if I told you I tried this and it was not working.
And I just copied your code and it works.
It change it around to this but all good.
Cost RAG = IF( PMO[Estimated Labour Cost - Widget Project Board] >= PMO[Actual Labour Cost to Date - Widget Project Board],"Green","Amber" )Thanks Tom. I know it was an easy peasy one.