Forum Discussion

bsharp's avatar
bsharp
Frequent Visitor
5 years ago
Solved

IF statement for custom column time zone

Can someone help me with the formula to create a custom column to add time zone info the to time values based on the "First Charachter" column? 

 

I need 17 to add #duration(0,3,0,0) and 19 to add #duration(0,1,0,0) to the times but just end up with (table[time] + duration (0,1,0,0)) in the output. I know I'm missing somethign simple. 

 

Thanks!

 

 

 

 

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi bsharp 

     

    It's Power Query M, right? Add a custom column

     

    if [First Charachter] = 17 then [Time]+#duration(0,3,0,0)
    else if [First Charachter] = 19 then [Time]+#duration(0,1,0,0) 
    else [Time]

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi bsharp 

     

    It's Power Query M, right? Add a custom column

     

    if [First Charachter] = 17 then [Time]+#duration(0,3,0,0)
    else if [First Charachter] = 19 then [Time]+#duration(0,1,0,0) 
    else [Time]