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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors