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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

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

I facing the error for newly created columns.

Total_Review_Not_Blocked =
IF('4-all_daily_companies_review_listing'[Total_Review_Moderated]=1 &&
'4-all_daily_companies_review_listing'[is_blocked]=0 &&
OR('4-all_daily_companies_review_listing'[is_overridden]=1,'4-all_daily_companies_review_listing'[is_overridden]=0),
1,0)
 
Total_Review_Published =
IF('4-all_daily_companies_review_listing'[Total_Review_Not_Blocked]=1 &&
NOT(ISBLANK('4-all_daily_companies_review_listing'[company_id_captured])),
1,0)

 

Power BI return with this error msg: DAX comparison operations do not support comparing values of type Text with values of type Integer

 

Anyone can solve this issue?

2 ACCEPTED SOLUTIONS
HotChilli
Super User
Super User

The first thing is to check the data type of all the columns in the DAX formulas:

 

[Total_Review_Moderated]
[is_blocked]
[is_overridden]

[Total_Review_Not_Blocked]
[company_id_captured]

They should all be a number

View solution in original post

Anonymous
Not applicable

4 REPLIES 4
sghanwat
New Member

I got error "DAX comparison operations do not support comparing values of type Text with values of type Integer. Consider using the VALUE or FORMAT function to convert one of the values." for new column.
 
 
Homeowner = if([HomeOwnerFlag]=0,"Not Homeowner","Homeowner")
 
I only changed type of comparison value 
 
 
Homeowner = if([HomeOwnerFlag]="0","Not Homeowner","Homeowner")
 
it executed without error.
 
HotChilli
Super User
Super User

The first thing is to check the data type of all the columns in the DAX formulas:

 

[Total_Review_Moderated]
[is_blocked]
[is_overridden]

[Total_Review_Not_Blocked]
[company_id_captured]

They should all be a number

Anonymous
Not applicable

Thanks it worked 🙂

Anonymous
Not applicable

Thanks, solved.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.