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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Date Slicer Time

Hello Team,

We are looking for a Date Slicer option in Power Bi Desktop where the user would select from a list of Options like (Current shift , Previous Shift ,Week to Date etc ) coming from a Database Table which in turn should filter a date range from Data Table.

For eg : when user selects Current shift Start and End date would be today 7:00 AM to Today 7 PM based on time and site the user belongs to .

Data parameter custom table looks like this

bsaragadam_0-1643645641045.jpeg

 

Date table and Data table and 2 separate tables .

Could anyone help with filtering the data table which has a datetime column based on this range ?

2 REPLIES 2
v-janeyg-msft
Community Support
Community Support

Hi, @Anonymous 

 

I see that you didn't reply amit, Does what he wrote don't meet your requirements?

I don't know if you can't write the code for Current shift and Previous Shift or you can't filter out this range in the data table by the time of the date table. Start and end columns are static?

 

Janey

amitchandak
Super User
Super User

@Anonymous , You can create a column like this you fact

 

Switch( True() ,

[Datetime] >= today() +time(19,0,0) && [Datetime] < today()+1+ time(7,0,0), "Current Shift",

[Datetime] >= today() +time(7,0,0) && [Datetime] < today() +time(19,0,0), "Previous Shift"

)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.