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
afaque03
Helper I
Helper I

To get shift from current date

Hi Need Help,

 

I am stucked in a situation where I have to get data like I want to extract current hour and then I have to compare that current hour from the set of hour shift Provided. In this case the shift 1 consist of hours like {"5","6","7","8","9","10","11","12"}, shift 2 {"13","14","15","16","17","18","19","20"} and shift 3 is {"00","01","02","03","04","21","22","23"}.

 

Suppose I extract hour from current time and it is 03 then this comes under shift 3 timing i.e, {"00","01","02","03","04","21","22","23"} then shift 3 will be considered as current shift and the rest of the shift will be considered as previous shift.

when suppose the hour changes to 5 then it lies in shift {"5","6","7","8","9","10","11","12"} i.e, it becomes current shift and the rest becomes the previous shift.

 

So i want this current shift and previous shift as filter so when I select current shift and if the current hour is 03 than the data fr shift 3 becommes the current shift data the rest becomes previous shift data. So the chart should show the current shift data for shift 03 and if in this case I select previous shift data than chart should show the data for rest of shift.

 

1 REPLY 1
v-yuta-msft
Community Support
Community Support

HI afaque03,

 

Create two columns, one column [value] contains values in 3 shifts, another column [shift key] contains shift numbers corresponding to values in [value] column. Then you can create a slicer based on [shift key] column and create a chart based on [value] column.

 

Regards,

Jimmy Tao

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.