Forum Discussion
DAX comparison operations do not support comparing values of type Text with values of type Integer
- Anonymous6 years ago
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.
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
resultTry 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 🙂