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

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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 Solution Authors