Forum Discussion
Michalison
4 years agoHelper II
Calculation error in measure
I am trying to do a measure that filters employees who resigned and leaving date > 01/01/2021 Count Resignations = CALCULATE(COUNT(Personnel_Records[Resignation]),FILTER('Personnel_Records','Per...
- 4 years ago
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) ) )
AUaero
4 years agoResponsive Resident
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)
)
)Michalison
4 years agoHelper II
Many thanks that worked perfectly