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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
guyatisk
Helper II
Helper II

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.

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

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.

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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