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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
amandabus21
Helper V
Helper V

24 hour day switch

Hello, 

 

How can I change my 24 hour revenue "day" to be from 2:59AM - 3:01AM the next day?  

 

My data is in the current form of 12:00 - 12:00 but need a seperate column/ measure for our working revenue day.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@amandabus21 , Assume you have timestamp (Date + time) 

 

Create a new column like

Correct date =

var _time = timevalue([Datetime])

var _date - datevalue([Datetime])

return

if(_time  < time(3,0,0) , _date  -1, _date)

 

Change this as per need

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

View solution in original post

5 REPLIES 5
amandabus21
Helper V
Helper V

Hi, 

 

I only have one table named "OccurenceTimeStamp" The table has data and time already together.

 

I want the slicer to be able to filter between 2:59AM - 3:01AM and not change my data.

amandabus21_0-1661985365778.png

 

 

 

Anonymous
Not applicable

Hi @amandabus21 ,

First, you need to create a time dimension table. And do not create any relationship with the fact table. Then you can create a measure with the conditions:

  • if the time between 2:59 and 24:00 then current day
  • if the time between 0:00 and 3:01 then current day+1

How did you want to display the data on the visual using the fact table? Could you please provide more details on your requirement? Thank you.

Best Regards

Hello, 

 

I am still unable to solve

So do i need to create two seperate columns? One with date and one with time? 

 

If i do that, what measure do I use after that?

 

I want to filter all my information based on the 2:59AM - 3:01AM clock. So for example I want to know how many late buses happened on 9/1/22. but on 9/1/22 from 2:59AM - 3:01AM

amitchandak
Super User
Super User

@amandabus21 , Assume you have timestamp (Date + time) 

 

Create a new column like

Correct date =

var _time = timevalue([Datetime])

var _date - datevalue([Datetime])

return

if(_time  < time(3,0,0) , _date  -1, _date)

 

Change this as per need

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.