Forum Discussion
Using multiple filters in a calculate
- 6 years ago
Hi LazyAdmin
You were almost there. Try this:
AmountOverdueSurveys = CALCULATE( DISTINCTCOUNT( 'project-surveys'[Id] ); FILTER( 'project-surveys'; 'project-surveys'[completed_at] <= [MaxDate] && 'project-surveys'[completed_at] >= [MinDate] && 'project-surveys'[status] = "overdue" ) )Best regards,
Martyn
If I answered your question, please help others by accepting it as a solution.
Hi LazyAdmin
You were almost there. Try this:
AmountOverdueSurveys =
CALCULATE(
DISTINCTCOUNT( 'project-surveys'[Id] );
FILTER(
'project-surveys';
'project-surveys'[completed_at] <= [MaxDate]
&& 'project-surveys'[completed_at] >= [MinDate]
&& 'project-surveys'[status] = "overdue"
)
)
Best regards,
Martyn
If I answered your question, please help others by accepting it as a solution.
It worked, was the same solution as my second formula. The mistake I made in the date filter is that an overdue record is never completed, so it doesn't have a complete_at date (only a scheduled date).
- MartynRamsden6 years ago
Solution Sage
Hi LazyAdmin
Your 2nd DAX expression was almost there, you just had an extra semicolon on the last line of your filter expression which would have caused an error.
Best regards,
Martyn
If I answered your question, please help others by accepting it as a solution.