Forum Discussion
filter table which does not contain specific text
Hello
I need to filter my table with quick measure by DAX which does not contain specific string.
I calculated it with below formula , but it does not worked.
Please help ! Kinldy respond !
COUNTROWS(FILTER('PTS [Short Description]',not(CONTAINSSTRING('PTS [Short Description]',"GMI" )) &&
not(CONTAINSSTRING('PTS [Short Description]',"PTD")) &&
not(CONTAINSSTRING('PTS [Short Description]',"UTILITIES")) &&
not(CONTAINSSTRING('PTS [Short Description]',"IBM")) &&
not(CONTAINSSTRING('PTS [Short Description]',"CV")) &&
not(CONTAINSSTRING('PTS [Short Description]',"UBIX")) &&
not(CONTAINSSTRING('PTS'[Short Description],"FCD"))
not(CONTAINSSTRING('PTS'[Description],"MSGW")))
Hi Manasi25 You need to remove closing brackets in filter function. See the red mark in the given image:
Hope this helps!!
4 Replies
- ryan_mayuSuper User
i think the parameter after FILTER should be a table.
maybe try to change FILTER('PTS [Short Description]' to FILTER(PTS
- ThejeswarSuper User
Hi Manasi25 ,
In the DAX that you shared, there is a bracket missing at the end. Not sure if it is something missed during copy.
COUNTROWS(FILTER('PTS [Short Description]',not(CONTAINSSTRING('PTS [Short Description]',"GMI" )) && not(CONTAINSSTRING('PTS [Short Description]',"PTD")) && not(CONTAINSSTRING('PTS [Short Description]',"UTILITIES")) && not(CONTAINSSTRING('PTS [Short Description]',"IBM")) && not(CONTAINSSTRING('PTS [Short Description]',"CV")) && not(CONTAINSSTRING('PTS [Short Description]',"UBIX")) && not(CONTAINSSTRING('PTS'[Short Description],"FCD")) not(CONTAINSSTRING('PTS'[Description],"MSGW"))))