Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
bsharp
Frequent Visitor

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!

 

 

 

bsharp_0-1615237108787.png

 

1 ACCEPTED SOLUTION
Vera_33
Resident Rockstar
Resident Rockstar

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]

View solution in original post

1 REPLY 1
Vera_33
Resident Rockstar
Resident Rockstar

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]

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.