Forum Discussion
i820017
4 years agoResolver II
Time Subtractions
I am trying to do a time subraction as a calculated column.
For example, the highlighted row should have hours = 8.5 (6:30 pm - 10:00 am)
Can this be done as a column or do I have to use a measure?
Hi,
This calculated column formula works
=(Table1[End_Date_Repeat]-Table1[Event_Date_Repeat])*24
6 Replies
- tackytechtomMost Valuable Professional
Hi i820017 ,
Here a solution for a calculated column:
DAX:
DurationCol = DATEDIFF ( Table[Event_Date_Repeat], Table[End_Date_Repeat], MINUTE ) / 60
Does this solve your issue? 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/ - tackytechtomMost Valuable Professional
Hi i820017 ,
Here a solution with a measure:
DAX:
DurationMeasure = SUMX (Table, DATEDIFF ( Table[Event_Date_Repeat], Table[End_Date_Repeat], MINUTE ) / 60 )
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/- i820017Resolver II
This solution worked as well, but I wanted the solution as a calculated column.
- Ashish_MathurSuper User
Hi,
This calculated column formula works
=(Table1[End_Date_Repeat]-Table1[Event_Date_Repeat])*24- i820017Resolver II
This worked...thanks!!
- Ashish_MathurSuper User
You are welcome.