Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello,
I'm wondering why this formula isn't working and how to correct it - this is the error message I'm getting: "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. Any help is greatly appreciated! 🙂
Solved! Go to Solution.
Check the data types of the filtered columns, for example 'phonecalls'[Acct Number]='new_product'[Account Number] both columns should be the same data type usually Whole number. Also, for [actualend], [new_startdate], [new_enddate]), [createdon], sometimes dates can displayed in numerical form (20200101) or Text form(01 Jan 2020), usually we need to change them to Date or Date/Time format.
You used Format() to change datatype or just change the datetype on Desktop menu.
Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check the data types of the filtered columns, for example 'phonecalls'[Acct Number]='new_product'[Account Number] both columns should be the same data type usually Whole number. Also, for [actualend], [new_startdate], [new_enddate]), [createdon], sometimes dates can displayed in numerical form (20200101) or Text form(01 Jan 2020), usually we need to change them to Date or Date/Time format.
You used Format() to change datatype or just change the datetype on Desktop menu.
Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
I am also facing same issue and I tried with above solution but its not working. Any help greatly appreaceated!
"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."
Thank you so much! Formatting was the issue 🙂
@dtango9
I have modified your measure
Connects =
VAR _new_startdate =
SELECTEDVALUE ( 'new_product'[new_startdate] )
VAR _new_enddate =
SELECTEDVALUE ( 'new_product'[new_enddate] )
VAR _Phonecalls =
CALCULATE (
COUNT ( 'phonecalls'[actualend] ),
FILTER (
'phonecalls',
'phonecalls'[Acct Number] = 'new_product'[Account Number]
&& 'phonecalls'[actualend] >= _new_startdate
&& 'phonecalls'[actualend] <= _new_enddate
)
)
VAR _Annotation =
CALCULATE (
COUNT ( 'Annotations'[createdon] ),
FILTER (
Annotations,
'Annotations'[Acccount #] = 'new_product'[Account Number]
&& 'Annotations'[createdon] >= _new_startdate
&& 'Annotations'[createdon] <= _new_enddate
)
)
VAR result = _Phonecalls + _Annotation
RETURN
result
Try this. If it is not working, use the table visual then return the variables one by one and identify which module is creating an issue.
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂