Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Ive got a table with columns like this.
1 column, persons (ID)
1 column with date and time (shiftstart)
1 column with date and time (shiftto)
And i want to see how many rows that have less then 11 hours between shiftstart and shiftto per person.
Person 1:
Shiftstart: 2023-01-03 16:00:00
Shiftto: 2023-01-03 22:00:00
Shiftstart: 2023-01-04 07:00:00
Shiftto: 2023-01-04 16:00:00
That would result in 1 row. Less then 11 hours between when the first shift ended to the second shift started.
I dont have a clue how to make this work 😕
try this
Hours = Datediff ( ShiftFrom, ShiftTo, Hour )
Just put the field shift from and shift to in the measure.
If I answered your question, please mark my post as solution so it would appeare to others, Appreciate your Kudos 👍
Proud to be a Super User! | |
I tried it but it only counts the hours between shiftstart and shiftto on one line.
I want to know the hours between date 1 and date 2.
If there is less then 11 hours between ShiftTo date 1 and ShiftStart date 2.
Hello @Kristiankommune ,
check if you could use this video for your case https://youtu.be/6JA6uy3ZRBA
If I answered your question, please mark my post as solution so it would appeare to others, Appreciate your Kudos 👍
Proud to be a Super User! | |
I dont know if that helped me.
This is my table below.
This is the same person (perid).
And the two dates has less then 11 hours between the end of 21/2 and the start of 22/2.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.