Forum Discussion

MathildaP's avatar
MathildaP
Frequent Visitor
5 years ago
Solved

Filter not working in Power BI desktop

I am trying to put a filter on a column in Power BI but the filter returns the opposite of what I have filtered. 😕

 

I tried to trim the text but this did not help. 

  • The project1,2, 3 are the opposite of what I put in the filter.

    = Table.SelectRows(#"Replaced Value5", each ([WorkspaceName] <> "Projectname1" and [WorkspaceName] <> "Projectname2" and [WorkspaceName] <> "Projectname3"))

     

    = Table.SelectRows(#"Replaced Value5", each ([WorkspaceName] <> "Projectname1" and [WorkspaceName] <> "Projectname2" and [WorkspaceName] <> "Projectname3"))

    Im thinking the error has somehow to do with this but this is a previous step that is needed for something else:
    #"Replaced Value5"

3 Replies

    • MathildaP's avatar
      MathildaP
      Frequent Visitor

      The project1,2, 3 are the opposite of what I put in the filter.

      = Table.SelectRows(#"Replaced Value5", each ([WorkspaceName] <> "Projectname1" and [WorkspaceName] <> "Projectname2" and [WorkspaceName] <> "Projectname3"))

       

      = Table.SelectRows(#"Replaced Value5", each ([WorkspaceName] <> "Projectname1" and [WorkspaceName] <> "Projectname2" and [WorkspaceName] <> "Projectname3"))

      Im thinking the error has somehow to do with this but this is a previous step that is needed for something else:
      #"Replaced Value5"

      • v-jingzhang's avatar
        v-jingzhang
        Icon for Community Support rankCommunity Support

        Hi MathildaP 

        Sorry I'm a little confused. You want to keep rows with "Projectname1", "Projectname2", "Projectname3" or remove rows with these three values?

         

        If you want to keep these rows, try

        = Table.SelectRows(#"Replaced Value5", each ([WorkspaceName] = "Projectname1" or [WorkspaceName] = "Projectname2" or [WorkspaceName] = "Projectname3"))

         

        If you want to remove these rows, try your original codes.

         

        Regards,
        Community Support Team _ Jing
        If this post helps, please Accept it as the solution to help other members find it.