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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
itimatic
Frequent Visitor

If else complex statement

Hello! Can anyone help in correcting this if statment? I'm getting error "Token Eof expected"Screenshot_22.png

IF [started_at] = NULL and [done] = NULL and [cancelled] = NULL then "Not started" else IF [started_at] != NULL and [done] = NULL and [cancelled] = NULL then "Ongoing" else IF [cancelled] != NULL then "Cancelled" else "N/A"

1 ACCEPTED SOLUTION
HotChilli
Community Champion
Community Champion

small "if".

I haven't looked at the logic but fix that first.

View solution in original post

4 REPLIES 4
itimatic
Frequent Visitor

Thanks for your hint,. it worked now. this is the final formula for reference:

if [started_at] = null and [done] = null and [cancelled] = null then "Not started"
else if [started_at] <> null and [done] = null and [cancelled] = null then "Ongoing"
else if [done] <> null then "Completed"
else if [cancelled] <> null then "Cancelled" else "N/A")

HotChilli
Community Champion
Community Champion

small "if".

I haven't looked at the logic but fix that first.

Screenshot_23.png

Thanks! A bit better 😁 Now getting the error on NULL. 

Helpful resources

Announcements
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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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