Forum Discussion
Minute in between timestamp
- 6 years ago
I created a sample data. Where I assumed batch has a start and end time.
I also created time buckets of every hour
Then used CrossJoin to create a new table. (This can be imported for less number of columns)
and then calculated the hourly minutes
Refer to the table: 'Table' in the pbix , check the last 3 columns.
https://www.dropbox.com/s/5wo5jhzl488zy69/Minute_between%20Hours.pbix?dl=0
Table = filter(CROSSJOIN('time bucket','Batch'),('time bucket'[Start] <= 'Batch'[B End] && 'time bucket'[End] >= 'Batch'[B Start])) Final End = if('Table'[B End]<'Table'[End],'Table'[B End],'Table'[End]) Final Start = if('Table'[B Start]>'Table'[Start],'Table'[B Start],'Table'[Start]) Min Diff = DATEDIFF('Table'[Final Start],'Table'[Final End],MINUTE)Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges
Connect on Linkedin
I created a sample data. Where I assumed batch has a start and end time.
I also created time buckets of every hour
Then used CrossJoin to create a new table. (This can be imported for less number of columns)
and then calculated the hourly minutes
Refer to the table: 'Table' in the pbix , check the last 3 columns.
https://www.dropbox.com/s/5wo5jhzl488zy69/Minute_between%20Hours.pbix?dl=0
Table = filter(CROSSJOIN('time bucket','Batch'),('time bucket'[Start] <= 'Batch'[B End] && 'time bucket'[End] >= 'Batch'[B Start]))
Final End = if('Table'[B End]<'Table'[End],'Table'[B End],'Table'[End])
Final Start = if('Table'[B Start]>'Table'[Start],'Table'[B Start],'Table'[Start])
Min Diff = DATEDIFF('Table'[Final Start],'Table'[Final End],MINUTE)
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges
Connect on Linkedin