Forum Discussion

alexcatala's avatar
alexcatala
Helper IV
5 years ago
Solved

Exclude rows

Hi, I am trying to filter a column excluding 2 job titles, but it doesn't work.

 

I have tried in the Query Editor with the main filter and setting "does not contain", but doesn't work.

 

Any other suggestion to exclude specific rows named: EXample: Assitant Manager or Supervisor.

 

Thanks

  • Hi alexcatala 

    If you start with data like this in the Query Editor

     

    Click on the filter button on the Job Title column and uncheck the jobs you want to remove and click OK

     

    Leaving you with this

     

    Regards

    Phil


    If I answered your question please mark my post as the solution.
    If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.

7 Replies

  • alexcatala , a measure to filter these two


    measure =
    calculate(countrows(Table), filter(Table, not(Table[job] in {"Assitant Manager","Supervisor"})))

    • alexcatala's avatar
      alexcatala
      Helper IV

      Hi amitchandak 

       

      I am not trying to count the rows, I just want to remove these values and keep seeing the remaining as a text. Because are text values and we want to keep seeing what the main job title to be able to filter them.

  • AlB's avatar
    AlB
    Community Champion

    Hi alexcatala 

    How exactly did you try the "does not contain", with the AND or the OR?

    Have you tried, on the filtering option in PQ, just to untick  Assitant Manager and  Supervisor?

    IF you show some sample data we can probably work it out

    Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

     

    Contact me privately for support with any larger-scale BI needs, tutoring, etc.

     

    Cheers 

     

    • alexcatala's avatar
      alexcatala
      Helper IV

      Hi AlB 

       

      I went into the Power Query and I have used does not contain " Assistant Manager" and " Supervisor".

       

      The problem some of the jobs have also more text after "Assistant Manager" : Ex. Assistant Manager - London

  • Hi alexcatala 

    If you start with data like this in the Query Editor

     

    Click on the filter button on the Job Title column and uncheck the jobs you want to remove and click OK

     

    Leaving you with this

     

    Regards

    Phil


    If I answered your question please mark my post as the solution.
    If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.

  • v-easonf-msft's avatar
    v-easonf-msft
    Community Support

    Hi, alexcatala 

    Maybe you just need to change the  filter conditions to "do not end with".

    Best Regards,
    Community Support Team _ Eason