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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
datadelta
Helper III
Helper III

Having difficulty with conditional formatting using a formula and both items are numbers

I'm trying to make a conditional formatting comparing two data points in order to reflect red if lower and green if equal or higher.

 

I created a column and wrote the forumual but DAX is telling me it won't support comparing number to text.  both columns identified are indeed numbers within the data set.

 

Any ideas?

='Day Model'[actual days]]=if('Day Model'[actual days]<'Day Model'[expected days] *I stopped writing formuala dude to the DAX error.

1 ACCEPTED SOLUTION

I solved this.  I rewrote the formula.  Thank you for your help!

View solution in original post

6 REPLIES 6
Kishore_KVN
Super User
Super User

No it will work. Please write complete DAX in you pbix and try if it shows error again then please let us know we will try to help you in this forum. 

Thank you.  Okay, I got it to display a response but I was looking to change the color of the "actual days" data point.  This just added a field to my data.  Should I not be using "New Column"?  I have the true / false as "1" and "2" to see if the formula worked.  I did received the 1's and 2's but not really the outcome I needed.

 

Thank you

You can use it either with 'IF' or 'SWITCH' functions. Please let me know the DAX of measure or column that you are writing. If I can modify it I will try to help you in that. 

 

Between please mark the relevant reply as solution so that others can reach there fast. Thanks. 

Kishore_KVN
Super User
Super User

Can you please select actual days column and expected days columns and share the screenshot of what is its datatype in the column tools. 

Thanks for the reply. My report takes an average from all reporting entitites and has several related questions where we track actual vs expected.  

 

Here is the data table:

datadelta_0-1685540530044.png

 

I solved this.  I rewrote the formula.  Thank you for your help!

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.