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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
KGBOR
Helper I
Helper I

IF function with time column

Hello, I'm stuck at a probably pretty simple issue with the IF function. I have a column in time format (hh:mm:ss) and what I want to do with it is to create another where I get a 1 whenever the time is over 00:00:45 and a 0 if it's equal or below that. I did use this function before however I never got a syntax error for that. Any suggestions? Thank you!

2 ACCEPTED SOLUTIONS
ryan_mayu
Super User
Super User

@KGBOR 

is this what you want?

Column = if('Table'[Column1]>time(0,0,45),1,0)

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

Anonymous
Not applicable

Hi,
Have you tried using IF((["Date column"])>TIME(00,00,45),1,0)?


I hope that helps 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi,
Have you tried using IF((["Date column"])>TIME(00,00,45),1,0)?


I hope that helps 

Indeed it did! Thank you! Is there any specific reason why it only works with the TIME function? I've used it with other time formatted columns (e.g. for deductions) and I did not have to use this additional function. Thanks again!

ryan_mayu
Super User
Super User

@KGBOR 

is this what you want?

Column = if('Table'[Column1]>time(0,0,45),1,0)

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

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

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.