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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Bali2022
Frequent Visitor

Dynamically Filtering PBI Visuals based on date range

I need help with dynamically filtering my Power BI visuals based on the [Start Date] and [End Date] that a user enters into a slicer.

 

My data model is very simple. I have one fact table that consists of distinct worker records where each worker has a [start date] and an [end date] of when the worker started and finished their work assignment.


And there's a calendar table linked to this fact table.

What I want is to be able to enter a [start date] and an [end date] range into a slicer and then based on these dates the worker records would be filtered down based on the worker records’ [start date] and [end date] to only those worker records that would be considered “active” during the date range entered. So for instance, let's say you enter a [start date] of 1/1/2023 and an [end date] of 3/31/2023 into the slicer date range. So then the worker records where the worker has a [start date] of less than or equal to the slicer’s [end date] and a worker [end date] greater than the slicer’s [start date] than the worker record would be considered “active” during the date range entered and would be displayed in my various PBI visuals.

I thought I could create [start date] and [end date] parameters that could be fed by slicer entires and these parameters could be input into a DAX formula that dynamical populates a custom column in my fact table that populates with “Active Worker” or “Inactive Worker” values. However, I keep encountering various errors.

Can anyone please assist this Power BI novice with this scenario? I'd be very grateful! Thank you PBI Community!

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

I have solved a similar problem in the attached PBI file.

Hope this helps.

Ashish_Mathur_0-1714882784080.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

I have solved a similar problem in the attached PBI file.

Hope this helps.

Ashish_Mathur_0-1714882784080.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thank you for sharing this Ashish! 

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.