Forum Discussion
DAX Formula for column not working
Hello all,
I have a problem with a DAX column. The issue is that it is bringing in the unwanted results. Here is an example: If the Number which is an "AccountNumber" is the same within the group and the columns 4A, 4B, 5A and 5B say ANYTHING other than "Complete" than it should say "KEEP" else "REMOVE. Because the below table has "Complete" and the field "Numbers are all the same, it should say "REMOVE.
With my initial DAX formula, I see that it is not correct, see below examples. Any assistance you can provide, I would greatly appreciate. Thank you in advance! 🙂
Aother example:
4 Replies
- AnonymousNot applicable
Hi Anonymous ,
You can try formula like below:
NewColumn = IF( COUNTROWS(FILTER(YourTable, YourTable[nber] = EARLIER(YourTable[nber]) && ( YourTable[4A Status] <> "Complete" || YourTable[4B Status] <> "Complete" || YourTable[5A Status] <> "Complete" || YourTable[5B Status] <> "Complete" ) )) > 0, "KEEP", "REMOVE" )Best Regards,
Adamk KongIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot applicable
hello v-Kongfanf-msft,
Thank you, but that didn't work. It yielded the following results. It says "KEEP", but it should say "REMOVE" because within that group of Numbers which is an Account Number, they say "Complete" across the rows of 4A, 4B, 5A, and 5B.
- AnonymousNot applicable
Hi Anonymous ,
Pls provide test data and detail desire result.
Best Regards,
Adamk Kong