Forum Discussion
Filter Active Clients by Date Range
How about this.
Fill you blanks in the End Date column with something like 31/12/9999
Create 2 new tables that consist of a single column of the dates you want to filter on, Start[Date] and End[Date]
Put a slicer on the Start[Date]
Put a slicer on the End[Date]
Write these helper measures
Selected Start = lastdate(Start[Date])
Selected End = lastdate(End[Date])
Write a measure that filters the customers. Something like this.
=Calculate(countrows(customers),filter(customers, customers[Start Date] >=[ Selected Start] && customers[End Date] <= [selected End]))
Ok. Thank you for clarifying. Now I'm getting this error.
- MattAllington10 years ago
Community Champion
The first parameter of your filter function is a column - that is not allowed. You will note in my formula it is a table.
- reast10 years ago
Helper II
Thanks for your patience. I fixed the measure: Measure = Calculate(countrows('Clients'),filter('Clients', 'Clients'[INTAKE_DATE] >=[Selected Start] && 'Clients'[Discharge] <= [selected End])).
However, it still only seems to be pulling new clients in the date range, not all active clients (should be over 300).