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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
mp390988
Post Patron
Post Patron

How to enter a formula to check if time was before 11am

Hi,

 

I am entering this formula in a custom column inside power query editor:

 

mp390988_0-1745162248825.png

 

What am I doing wrong please?

 

Thanks

2 ACCEPTED SOLUTIONS
SundarRaj
Super User
Super User

Hi @mp390988 , the if you wrap around the "11:00:00" in TimeFromText(), it should work. Thanks!

SundarRaj_0-1745162888371.png

Code:
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Date", type datetime}, {"Time", type time}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each if [Time] >= Time.FromText("11:00:00") then "Yes" else "No")
in
#"Added Custom"

Sundar Rajagopalan

View solution in original post

Vijay_A_Verma
Super User
Super User

In your formula, replace 11:00:00 with #time(11, 0, 0)

or Time.FromText("11")

View solution in original post

2 REPLIES 2
Vijay_A_Verma
Super User
Super User

In your formula, replace 11:00:00 with #time(11, 0, 0)

or Time.FromText("11")

SundarRaj
Super User
Super User

Hi @mp390988 , the if you wrap around the "11:00:00" in TimeFromText(), it should work. Thanks!

SundarRaj_0-1745162888371.png

Code:
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Date", type datetime}, {"Time", type time}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each if [Time] >= Time.FromText("11:00:00") then "Yes" else "No")
in
#"Added Custom"

Sundar Rajagopalan

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors