cancel
Showing results for 
Search instead for 
Did you mean: 

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

Reply
jimmyg706
Helper III
Helper III

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

 

jimmyg706_0-1696168002811.png

 

1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey @jimmyg706,

 

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



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

2 REPLIES 2
jimmyg706
Helper III
Helper III

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

 

 

TomMartens
Super User
Super User

Hey @jimmyg706,

 

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



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

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

Power BI Fabric Summit Carousel

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