Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

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



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
Anonymous
Not 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.

 

 

TomMartens
Super User
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



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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors