Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I am trying to do a measure that filters employees who resigned and leaving date > 01/01/2021
Calculation error in measure 'Calculation'[Count Resignations]: 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.
Can anyone help me on this as I don't know the correc
Solved! Go to Solution.
Maybe just a copy/paste error, but your calculation is missing a closing parentheses. What is the data type of Personnel_Records[Resignation]? If it's not a string then there's no need to enclose the 1 in double quotes. You can also try passing the date to the [Leaving Date] explicitly as a date.
CALCULATE(
COUNT(Personnel_Records[Resignation]),
FILTER(
'Personnel_Records',
'Personnel_Records'[Resignation] = 1 &&
'Personnel_Records'[Leaving Date] > DATE(2021, 1, 1)
)
)
Maybe just a copy/paste error, but your calculation is missing a closing parentheses. What is the data type of Personnel_Records[Resignation]? If it's not a string then there's no need to enclose the 1 in double quotes. You can also try passing the date to the [Leaving Date] explicitly as a date.
CALCULATE(
COUNT(Personnel_Records[Resignation]),
FILTER(
'Personnel_Records',
'Personnel_Records'[Resignation] = 1 &&
'Personnel_Records'[Leaving Date] > DATE(2021, 1, 1)
)
)
Many thanks that worked perfectly
Quotes (""). Comparisons need to be done on the same datatype
How do I do this? - sorry teaching myself PoeerBI as I go along
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
123 | |
79 | |
49 | |
38 | |
37 |
User | Count |
---|---|
196 | |
80 | |
70 | |
51 | |
42 |