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
chjr7777
New Member

Filter by date and time range

We have two work schedules.

Schedule 1: 

Mon 5a until Sat 5a

Schedule 2:

Mon 5a-11:59p
Tues 12a-2a, 5a-11:59p
Wed 12a-2a, 5a-11:59p
Thur 12a-2a, 5a-11:59p
Fri 12a-2a, 5a-11:59p
Sat 12a-2a, 5a-11:59p
Sun 12a-2a

 

I need to filter all matching data by these date and time ranges.

These could be 2 separate reports.

Data example:

 

chjr7777_1-1631839558192.png

 

Can I use a DAX filter to accomplish this or do I need to create a calendar table?

1 REPLY 1
lbendlin
Super User
Super User

Not only do you need a calendar table, but you will also need a separate Shifthours table.  For each day of the week and each of the 24 hours you need to indicate if a shift is active in that hour or not.

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.