Forum Discussion
LazyAdmin
6 years agoNew Member
Using multiple filters in a calculate
I am trying to combine two filters. I search the forum and I am correct the code below should work: AmountOverdueSurveys =
CALCULATE(
DISTINCTCOUNT('project-surveys'[Id]);
FILTER(...
- 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.
LazyAdmin
6 years agoNew Member
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).
MartynRamsden
Solution Sage
6 years agoHi 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.