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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
hirwa
Regular Visitor

Contious events time cutoffs

Hello guys,

 

I have a question and I am not sure if it has been asked before somewhere else, but please give it a try. I have a continous event. For example, the cutoff reporting time is midnight - to make it easier. Then there is an event that start 23:40:50 and finishes 00:34:40. I was able to write a code that can report this event from 23:40:50 and finishes 23:59:59 for yesterday and works fine. Now the question to you guys, how do I bring the left time frame from 00:00:00 to 00:40:50 of this event to the next day. Suppose that a sensor is creating different events no stop and we want to report only the events from 00:00:00 to 23:59:59.


Thank you in advance!

 

H.

2 REPLIES 2
amitchandak
Super User
Super User

@hirwa , Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

refer if this can help

Continuous streak : https://youtu.be/GdMcwvdwr0o

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

Hi @amitchandak ,

 

Sorry, I have been very busy and many thank for your reply.

I am not quite sure if I can upload a file here.

Here is a sample table below (Not enough), but it will give you an idea. There are 7 activities done by a machine A, and each activity is recorded in second. We are asked to provide the activities happend in 24 hours window - their total hours/min/sec for each activity. Let's say from 24/03/2023 06:00 AM to 25/03/2023 06:00 AM the next day.

 

Now if the activity 7 starts 25/03/2023 05:55:20 AM to 25/03/2023 06:14:10 AM, we have to make sure that the cut-off for 24 hours is 25/03/2023 06:00:00 AM, which means activity 7 would be from 25/03/2023 05:55:20 AM to 25/03/2023 06:00:00 AM for this reporting of 24 hrs. The result would look like (in chart) with 24 hrs, distributted with different activities total in 24 hrs. from 6 AM to 6 AM the next day.

 

24 hrs       

act1 = 2 hrsact4 = 3 hrsact3 = 7hrsact5 = 1hrsact2 = 2.5 hrsact6 = 1.2 hrs...

 

 

machinestart_dateend_dateactivityrunning_time (sec)
A24/01/2023 14:35:2024/01/2023 14:35:24Activity 14
A24/01/2023 14:35:2424/01/2023 14:35:51Activity 227
A24/01/2023 14:35:5124/01/2023 14:35:54Activity 23
A24/01/2023 14:35:5424/01/2023 14:36:04Activity 210
A24/01/2023 14:36:0424/01/2023 14:40:35Activity 2271
A24/01/2023 14:40:3524/01/2023 14:40:36Activity 11
A24/01/2023 14:40:3624/01/2023 14:41:10Activity 234
A24/01/2023 14:41:1024/01/2023 14:46:00Activity 2290
A24/01/2023 14:46:0024/01/2023 14:46:02Activity 12
A24/01/2023 14:46:0224/01/2023 14:46:50Activity 248
A24/01/2023 14:46:5024/01/2023 14:46:52Activity 22
A24/01/2023 14:46:5224/01/2023 14:47:19Activity 227
A24/01/2023 14:47:1924/01/2023 14:50:51Activity 2212
A24/01/2023 14:50:5124/01/2023 14:50:52Activity 11
A24/01/2023 14:50:5224/01/2023 14:51:58Activity 266
A24/01/2023 14:51:5824/01/2023 14:56:19Activity 2261
A24/01/2023 14:56:1924/01/2023 14:56:24Activity 15
A24/01/2023 14:56:2424/01/2023 14:59:05Activity 2161
A24/01/2023 14:59:0524/01/2023 15:02:17Activity 2192
A24/01/2023 15:02:1724/01/2023 15:02:20Activity 13
A24/01/2023 15:02:2024/01/2023 15:04:14Activity 2114
A24/01/2023 15:04:1424/01/2023 15:04:20Activity 26
A24/01/2023 15:04:2024/01/2023 15:05:53Activity 293
A24/01/2023 15:05:5324/01/2023 15:09:27Activity 2214
A24/01/2023 15:09:2724/01/2023 15:09:29Activity 12
A24/01/2023 15:09:2924/01/2023 15:10:25Activity 256
A24/01/2023 15:10:2524/01/2023 15:10:35Activity 210
A24/01/2023 15:10:3524/01/2023 15:12:22Activity 2107
A24/01/2023 15:12:2224/01/2023 15:15:26Activity 2184
A24/01/2023 15:15:2624/01/2023 15:15:27Activity 11
A24/01/2023 15:15:2724/01/2023 15:19:23Activity 2236
A24/01/2023 15:19:2324/01/2023 15:22:40Activity 2197
A24/01/2023 15:22:4024/01/2023 15:22:42Activity 12
A24/01/2023 15:22:4224/01/2023 15:26:59Activity 2257
A24/01/2023 15:26:5924/01/2023 15:30:22Activity 2203
A24/01/2023 15:30:2224/01/2023 15:30:27Activity 15
A24/01/2023 15:30:2724/01/2023 15:31:33Activity 266
A24/01/2023 15:31:3324/01/2023 15:35:12Activity 2219
A24/01/2023 15:35:1224/01/2023 15:35:16Activity 14
A24/01/2023 15:35:1624/01/2023 15:36:00Activity 244
A24/01/2023 15:36:0024/01/2023 15:40:50Activity 1290
A24/01/2023 15:40:5024/01/2023 15:42:53Activity 2123

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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