Forum Discussion
Calculate time different in hours
Hi Guys,
I am trying to calculate accurate Hours from two different shift. When I applied datediff fiction on the column it shows 7.5 hours instead of 7.6 hours. Please refer attached.
Any solution? I am new to powerbi
Anonymous
pls try this
Column = ('Table'[end]-'Table'[start])*24-'Table'[break time]Hi, Anonymous
The result obtained by the DATEDIFF function is an integer, and it does not contain the decimal part. You can consider counting the result in minutes and dividing by 60
Please change your formula as follows:
Shift Worked1 = DATEDIFF ( 'Logistics Shift Work'[Start Time], 'Logistics Shift Work'[End Time], MINUTE ) / 60 - 'Logistics Shift Work'[Break Time]Best Regards,
Community Support Team _ Eason
2 Replies
- v-easonf-msftCommunity Support
Hi, Anonymous
The result obtained by the DATEDIFF function is an integer, and it does not contain the decimal part. You can consider counting the result in minutes and dividing by 60
Please change your formula as follows:
Shift Worked1 = DATEDIFF ( 'Logistics Shift Work'[Start Time], 'Logistics Shift Work'[End Time], MINUTE ) / 60 - 'Logistics Shift Work'[Break Time]Best Regards,
Community Support Team _ Eason - ryan_mayuSuper User
Anonymous
pls try this
Column = ('Table'[end]-'Table'[start])*24-'Table'[break time]