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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
Hadill
Helper I
Helper I

If-else-else Error

I tried many ways to write the If- else quiery, and ever time I get the same error an I dont know the reason, I think I apply the right quirey.

Is anybody have any explanation for that?

 

Thanks in advance

 

tempsnip.png

1 ACCEPTED SOLUTION

Hi @Hadill ,

 

Try pasting this into a new custom column window:

if [Funnel Status] = "Booked" or [Funnel Status] = "Signed" or [Funnel Status] = "Committed" then "Forecast" else "Active"

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

6 REPLIES 6
Hadill
Helper I
Helper I

Hello BA, thanks for your reply !

 

I fixed my queiry as per your comments, but I still have the same issue. 

Hi @Hadill ,

 

Can you post the code as it appears now after the changes please?

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Hi @BA_Pete 

 

here we are, I tried to change the code body.

I was wondering if there any thing have to be done with the settings to enable this case?

 

issue 1 .pngissue 2.pngIssue 3.png

 

Hi @Hadill ,

 

Try pasting this into a new custom column window:

if [Funnel Status] = "Booked" or [Funnel Status] = "Signed" or [Funnel Status] = "Committed" then "Forecast" else "Active"

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Hello @BA_Pete 

 

Thanks a lot for your support, I tried to apply the SWITCH function insted, and it works perfectly ! 

I added a coulomn in DAX query edit as follow :

 

Forecast vs Active = SWITCH( TRUE(), [Wrong Funnel Status] = "Booked" || [Wrong Funnel Status] = "Signed" || [Wrong Funnel Status] = "Committed", "Forcasted", "Active")
 
 
BA_Pete
Super User
Super User

Hi @Hadill ,

 

Try making the following changes to remove the error:

 

1) Make sure that your third reference to [Funnel Status] is spelt correctly.

2) Make sure there is a space between "Committed" and 'and'

3) Make sure the keyword 'if' is lower case

4) Remove the semicolon ';' at the end

 

I also think you will need to correct your evaluation as a single field can't be "Booked" AND "Committed" AND "Signed" all at the same time - you may need the OR operator here.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

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.