Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
guyatisk
Helper I
Helper I

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?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@guyatisk , In case you have two dates, refer to the HR way of finding active between dates

 

Power BI: HR Analytics - Employees as on Date: https://youtu.be/e6Y-l_JtCq4
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...
Power BI HR Active Employee Tenure Bucketing, and Hired, Terminated, and Active employees: https://youtu.be/fvgcx8QLqZU

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@guyatisk , In case you have two dates, refer to the HR way of finding active between dates

 

Power BI: HR Analytics - Employees as on Date: https://youtu.be/e6Y-l_JtCq4
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...
Power BI HR Active Employee Tenure Bucketing, and Hired, Terminated, and Active employees: https://youtu.be/fvgcx8QLqZU

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Thank you sir!  This does help.  Have a great day

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.