Forum Discussion
Anonymous
9 years agoNot applicable
PowerQuery if with multiple conditions AND OR
Hello Guys, How can I replicate this on PowerQuery ?? =if(ATC[WorkitemAssetState]=64, if(ATC[WorkitemIsClosed]=FALSE, if(ATC[WorkitemIsDeleted]=FALSE, if(ATC[M_WorkitemStatus]IN{"","Reviewi...
- 9 years ago
Hi Anonymous,
Based on my test, the formula below should work in PowerQuery. :smileyhappy:
=if [WorkitemAssetState]=64 and [WorkitemIsClosed]=false and [WorkitemIsDeleted]=false and ([M_WorkitemStatus]="Reviewing" or [M_WorkitemStatus]= "Available" or [M_WorkitemStatus]= "Research" or [M_WorkitemStatus] = "Progressing" or [M_WorkitemStatus] = "Testing" or [M_WorkitemStatus] = "Resolved" or [M_WorkitemStatus] = "<none>" or [M_WorkitemStatus] = "" or [M_WorkitemStatus] = "-" )and ([M_DefectResolutionId]= "-" or [M_DefectResolutionId] = "<Unknown>" or [M_DefectResolutionId] = "Resolution:1" or[M_DefectResolutionId] = "Resolution:7") then 1 else 0
Regards
v-ljerr-msft
9 years agoMicrosoft Employee
Hi Anonymous,
Based on my test, the formula below should work in PowerQuery. :smileyhappy:
=if [WorkitemAssetState]=64 and [WorkitemIsClosed]=false and [WorkitemIsDeleted]=false and ([M_WorkitemStatus]="Reviewing" or [M_WorkitemStatus]= "Available" or [M_WorkitemStatus]= "Research" or [M_WorkitemStatus] = "Progressing" or [M_WorkitemStatus] = "Testing" or [M_WorkitemStatus] = "Resolved" or [M_WorkitemStatus] = "<none>" or [M_WorkitemStatus] = "" or [M_WorkitemStatus] = "-" )and ([M_DefectResolutionId]= "-" or [M_DefectResolutionId] = "<Unknown>" or [M_DefectResolutionId] = "Resolution:1" or[M_DefectResolutionId] = "Resolution:7") then 1 else 0
Regards
- Anonymous9 years agoNot applicable
Thank you, I managed in the end. Thank you! :)
- Technowolf7 years agoHelper II
Hi
How did you solve this, I still have the same issue,
I syntax is excatly the same , the moment I add the or conditions the and conditions stops to work.