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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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"

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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"

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.