Forum Discussion

guyatisk's avatar
guyatisk
Icon for Helper II rankHelper II
2 years ago
Solved

Filter slicer by date

I have a few slicers for a report: Month, Year, Employee.  In the data, there is a column that has an applicable "Inactive Date".  Currently the report lists ALL employees that fall into the filter that is on the page itself and this works fine.  Now I want to filter OUT any employee from the list if the Month and Year splicers are after the Inactive Date so the employee will filter off of the employee list.  

 

An example:  I select NOV 2023 and Joe Smith appears in the employee list.  Joe Smith has an Inactive Date of December 5, 2023.  Because the date is AFTER November, 2023 it is okay he appear on the list as there is valid data for Joe Smith.  If I were to select DEC 2023, he should still appear because from Dec 1 to Dec 4 there might be valid data.  However, if I were to select JAN 2024, Joe Smith should be filtered off the employee list.

 

What would be a way to do this?   Maybe create a flag measure based on calculated dates and filter employees where this active flag is set to true?

2 Replies