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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Nested and if Statement - no errors but results don't show?

(I referenced this thread for help: https://community.powerbi.com/t5/Desktop/Power-Query-Nested-IF-AND-Statement/td-p/538947)

 

I am creating the below if statement to filter data in a table. The statement executes with no error messages. However, when I try to put this in a slicer to filter data, I don't get all of the options I would like to see (Not Started, Blank, In Progress, In DR, In GR) etc. The only ones that show up: Blank, In Progress, NA and Not Started. In DR and In GR don't show up. 

Is the bolded/blue part of my statement the part that is messing this up? If so, what would be a way to fix it?

 

 

if [Status] = "Open" and [Testing Status] = "Not Started"
then "Not Started"
else if [Status] = "Open" and [Testing Status] = ""
then "Blank"
else if [Status]= "Open" and [Testing Status] = "In Progress"
then "In Progress"
else if [Status] = "Complete" and [Status] = "Under Review (R)" and [Testing Status] = "In Review 1"
then "In DR"
else if [Status] = "Under Review (R2)" and [Testing Status] = "Review 2"
then "In GR"
else "NA"

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Status can not have two values, you need to use OR 

else if ( [Status] = "Complete" OR [Status] = "Under Review (R)" ) and [Testing Status] = "In Review 1"
then "In DR"

 

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , Status can not have two values, you need to use OR 

else if ( [Status] = "Complete" OR [Status] = "Under Review (R)" ) and [Testing Status] = "In Review 1"
then "In DR"

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.