Join 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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi All,
I know there's countless threads on DAX help but I've found none that have addressed my issue, I'm new to PBI so please be patient with me, I'm sorry if this is something obvious.
Let me know what I am doing wrong here, this DAX code to create a new collumn is not working - All of these data types are whole numbers - yes this is reflected Formatting>Data type.
INVALID_FILTER =
IF([INVALID_CALC] < "8" ,
IF([PARAM_C] >= [INVALID_CALC], [PARAM_C], "" )
,
IF(([PARAM_C]/[SITES_TESTED])*100 >= [INVALID_CALC],[PARAM_C], "" )
)
but I keep getting this error:
DAX comparison operations do not support comparing values of type Integer with values of type Text. Consider using the VALUE or FORMAT function to convert one of the values.
I have tried applying VALUE and FORMAT to all the values in my above script like this:
INVALID_FILTER =
IF(VALUE([INVALID_CALC]) < "8" ,
IF(VALUE([PARAM_C]) >= VALUE([INVALID_CALC]), VALUE([PARAM_C]), "" )
,
IF((VALUE([PARAM_C])/VALUE([SITES_TESTED]))*100 >= VALUE([INVALID_CALC]),VALUE([PARAM_C]), "" )
)
but it doesnt work, instead giving this error, which is slightly different.
DAX comparison operations do not support comparing values of type Number with values of type Text. Consider using the VALUE or FORMAT function to convert one of the values.
What am I doing wrong?
Thanks for your time.
Solved! Go to Solution.
@Oisdf Great question,
You are using Quotes "" on your numbers, which converts them to text, so try:
INVALID_FILTER =
IF([INVALID_CALC] < 8 ,
IF([PARAM_C] >= [INVALID_CALC], [PARAM_C], "" )
,
IF(([PARAM_C]/[SITES_TESTED])*100 >= [INVALID_CALC],[PARAM_C], "" )
)
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@Oisdf Great question,
You are using Quotes "" on your numbers, which converts them to text, so try:
INVALID_FILTER =
IF([INVALID_CALC] < 8 ,
IF([PARAM_C] >= [INVALID_CALC], [PARAM_C], "" )
,
IF(([PARAM_C]/[SITES_TESTED])*100 >= [INVALID_CALC],[PARAM_C], "" )
)
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Thank you @AllisonKennedy !
Collumn is working now, however the data is not as expected. All values are appearing as Null.
Example here, this row should not be Blank , it should be PARAM_C (10)
IF([PARAM_C] >= [INVALID_CALC], [PARAM_C], ""
Can you spot anything wrong?
@Oisdf You need to create this as a MEASURE, not a COLUMN to have it recognize the measures, hopefully this article helps explain things: https://excelwithallison.blogspot.com/2020/09/reporting-order-of-operations.html
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Hi @Oisdf ,
Please try this:-
INVALID_FILTER =
IF (
[INVALID_CALC] < 8,
IF ( [PARAM_C] >= [INVALID_CALC], [PARAM_C], BLANK () ),
IF (
( [PARAM_C] / [SITES_TESTED] ) * 100 >= [INVALID_CALC],
[PARAM_C],
BLANK ()
)
)
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!