The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
(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"
Solved! Go to Solution.
@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"
@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"
User | Count |
---|---|
78 | |
77 | |
37 | |
33 | |
31 |
User | Count |
---|---|
92 | |
81 | |
58 | |
48 | |
48 |