Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
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
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 ?
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
@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"
)
User | Count |
---|---|
66 | |
46 | |
20 | |
19 | |
15 |
User | Count |
---|---|
121 | |
41 | |
38 | |
28 | |
23 |