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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
timward10
Helper II
Helper II

DAX comparison operations do not support comparing values of type Integer with values of type Text.

I keep getting the error message DAX comparison operations do not support comparing values of type Integer with values of type Text when entering the formula below into PBI. I have amended the format of the columns to both be 'Whole number' but it still won't work. Can anyone help please!? 
 
Column = if(or('Opps+Products - Revenue Probability'[Contract Length (months)]="",'Opps+Products - Revenue Probability'[Contract Length (months)]=0),12,'Opps+Products - Revenue Probability'[Contract Length (months)])
 
 
1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @timward10 
"" is a "white space" in which the data type is a text...
Try to modify the formula to 
Column = if(isblank(or('Opps+Products - Revenue Probability'[Contract Length (months)]),'Opps+Products - Revenue Probability'[Contract Length (months)]=0),12,'Opps+Products - Revenue Probability'[Contract Length (months)])
OR
Column = if(or('Opps+Products - Revenue Probability'[Contract Length (months)]=blank(),'Opps+Products - Revenue Probability'[Contract Length (months)]=0),12,'Opps+Products - Revenue Probability'[Contract Length (months)])
if it won't work 

Please share sample data (excluding sensitive information) in text format, along with your expected result and any relevant logic. For guidance, refer to

How to provide sample data in the Power BI Forum

If possible, upload a simplified .pbix file using this guide:

 How to upload PBI in Community

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

3 REPLIES 3
Ritaf1983
Super User
Super User

Hi @timward10 
"" is a "white space" in which the data type is a text...
Try to modify the formula to 
Column = if(isblank(or('Opps+Products - Revenue Probability'[Contract Length (months)]),'Opps+Products - Revenue Probability'[Contract Length (months)]=0),12,'Opps+Products - Revenue Probability'[Contract Length (months)])
OR
Column = if(or('Opps+Products - Revenue Probability'[Contract Length (months)]=blank(),'Opps+Products - Revenue Probability'[Contract Length (months)]=0),12,'Opps+Products - Revenue Probability'[Contract Length (months)])
if it won't work 

Please share sample data (excluding sensitive information) in text format, along with your expected result and any relevant logic. For guidance, refer to

How to provide sample data in the Power BI Forum

If possible, upload a simplified .pbix file using this guide:

 How to upload PBI in Community

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Thank you so much @Ritaf1983 that has worked straight away, and the explanation makes perfect sense! Thank you again. 

Happy to help 🙂

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.