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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Nested If and & condition

Hi All,

 

I am trying write if statement wtih mulitple & conditions like the below screenshot as shown in the image.

 

Kidly help me to fix the same.

 

Rating.PNG

1 ACCEPTED SOLUTION
JirkaZ
Solution Specialist
Solution Specialist

Just check the definition of the function - https://docs.microsoft.com/en-us/dax/value-function-dax

It converts a number that is stored as text to a number so that you can compare it with another number. 

So in your original formula it would be like: 
IF(VALUE([Future Close Date]) > 99, ...)

View solution in original post

6 REPLIES 6
v-diye-msft
Community Support
Community Support

Hi @Anonymous 

 

As the error says, DAX comparison operations do not support comparing values of type number and values of type text. 

 

Please use VALUE or FORMAt function to convert the values.

 

Official documents for your reference:

https://docs.microsoft.com/en-us/dax/value-function-dax 

https://docs.microsoft.com/en-us/dax/format-function-dax 

 

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
Anonymous
Not applicable

Hi, Thanks for the reply. Where i should make use of the VALUE function? 

 

Column = IF(Sheet1[ISCLOSED]="false",1,0)
 
Regards,
Viresh
JirkaZ
Solution Specialist
Solution Specialist

@Anonymous Now you are referring to completely different formula than in you original post. Here you don't need to do any conversions (if the IsClosed is a text field and not True/False field)

Anonymous
Not applicable

Hi, Yes it is different calculation and i got it.

 

could you pls suggest, where i can use the VALUE fucntion in the orginal expression.

 

Thank you.

JirkaZ
Solution Specialist
Solution Specialist

Just check the definition of the function - https://docs.microsoft.com/en-us/dax/value-function-dax

It converts a number that is stored as text to a number so that you can compare it with another number. 

So in your original formula it would be like: 
IF(VALUE([Future Close Date]) > 99, ...)

JirkaZ
Solution Specialist
Solution Specialist

@Anonymous Make sure that all the columns in the condition are of Number type. This is not an issue of multiple conditions.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.