Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hello Experts,
I am trying to complete a measure calculation, however, facing issue with below error -
"DAX comparison operations do not support comparing values of type True/False with values of type Text. Consider using the VALUE or FORMAT function to convert one of the values."
Basically there are 2 calculations one for the employee and other for the contractor. I have horizontal bar chart, wherein I will be displaying the utilization per resource name. The chart has resource name on axis and on value place utilization ratio measure is used.
What is needed is, if Resource_type is Employee then use employee_utilization calculation else user other.
Here is my measure calculation -
Utilization_Ratio =
VAR Employee_Utilization = ( ('Table1'[Total_Days]) / (Another_Measure * 'Table1'[X_Column]) )*100
VAR Contractor_Utilization = ( ('Table1'[Total_Days]]) / (SUM('Table1'[Non_Billable_Hours]) + SUM('Table1'[Billable_Hours]) ) * 100 )
Return IF(ISFILTERED('Table1'[Resource_Type]) = "Employee", Employee_Utilization, Contractor_Utilization)
Kindly let me know where to apply the formatting to number as per the error.
Regards,
Abhay
Hi @AbhayB
ISFILTERED('Table1'[Resource_Type]) yieds a boolean (TRUE/FALSE) value and you are comparing it to "Employee", which is text. That seems to be the cause for the error. IF it is a measure as you said, you probably need something like this instead:
SELECTEDVALUE('Table1'[Resource_Type]) = "Employee"
Please mark the question solved when done and consider giving kudos if posts are helpful.
Cheers
I think for this part:
IF(ISFILTERED('Table1'[Resource_Type]) = "Employee", Employee_Utilization, Contractor_Utilization)
You want
IF(MAXX('Table1',[Resource_Type]) = "Employee" ...
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 76 | |
| 36 | |
| 31 | |
| 29 | |
| 26 |