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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.