The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi,
I am entering this formula in a custom column inside power query editor:
What am I doing wrong please?
Thanks
Solved! Go to Solution.
Hi @mp390988 , the if you wrap around the "11:00:00" in TimeFromText(), it should work. Thanks!
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"
In your formula, replace 11:00:00 with #time(11, 0, 0)
or Time.FromText("11")
In your formula, replace 11:00:00 with #time(11, 0, 0)
or Time.FromText("11")
Hi @mp390988 , the if you wrap around the "11:00:00" in TimeFromText(), it should work. Thanks!
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"