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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
bourne2000
Helper V
Helper V

Getting error in IF condition (We cannot apply field access to the type Number)

Hi

 

I am creating a custom column using the below IF Condition, syntax shows no error. However, an error is coming in the custom column

 

this is my query

if[Hour] >= 0  [Hour] <= 6 then "1 AM -6 AM" else

if[Hour] >= 6 and [Hour] <= 12 then "6 AM -12 PM" else


if[Hour] >= 12 and [Hour] <= 4 then "12 PM -4 PM" else


if[Hour] >= 4 and [Hour] <= 10 then "4 PM -10 PM" 
else "10 PM - 12 AM"

 

The error I am getting,

 

bourne2000_0-1621639176079.png

 

Please advise

1 ACCEPTED SOLUTION
HotChilli
Super User
Super User

missing "and" in the first line?

View solution in original post

1 REPLY 1
HotChilli
Super User
Super User

missing "and" in the first line?

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.