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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.