Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Time calculation

Hi,   Another query on calculating dates/times, but I haven't seen anything similar to what I'm trying to do, so I'd appreciate any help!   When we place an order with a carrier, we speicify the ...
  • Anonymous's avatar
    Anonymous
    7 years ago

    Anonymous 

     

    Thanks for detailed explaination

     

    Use below formula in Calculated Column

     

    Spoiler
    Duration (Hours) = 
    Var StartDate = TODAY()+'Table'[Order Cut Off]
    Var EndDate = TODAY()+'Table'[Delivery Time] + 'Table'[Day]
    RETURN
    (EndDate - StartDate) * 24


    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
    Proud to be Datanaut!

  • AlB's avatar
    AlB
    7 years ago

    Hi Anonymous 

    If Delivery Time and Order Cut Off are formatted as Time and Day as whole number, you can simply do

     

    NewColumn = 24*(Table1[Delivery Time] + Table1[Day] - Table1[Order Cut Off] )