Forum Discussion
Calculating Time from Start & End Times
- 6 years ago
Hi HenryJS ,
You could use Time.Hour() in query editor.
if [Start]>[End] then 24-Time.Hour([Start])+Time.Hour([End]) else Time.Hour([End])-Time.Hour([Start])Here is the result.
- 6 years ago
Hi HenryJS ,
Does that make sense? If so kindly mark my answer as a solution to close the case. Thanks in advance.
amitchandak parry2k how do I get the time?
HenryJS , That is what your initial formula was doing ? was it a measure or column?
- HenryJS6 years ago
Post Prodigy
amitchandak parry2k I have two columns 'Start' and 'End' both 'Time' data type.
I need a new column which calculates the hours difference between the start and end times.
Is this possible?
- parry2k6 years ago
Super User
HenryJS we already gave you a solution, why you are asking the same question. Can you add a new column based on the expression I posted.
Your existing column has a time format because your original calculation was [Start] - [End] which returned time.
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡