Forum Discussion

moesteez's avatar
moesteez
Icon for Helper I rankHelper I
6 years ago
Solved

Filter All in Power Query

Hi, quick question,

 

I have a table (stores) that is filtered based on a parameter (name) that a user selects when opening a template.

 

If I have a lot of stores, is there a shortcut I can use if the user selects my "All" option. At the moment Im writing every store name out in the query, eg

 

if #"Store Filter" = "All" then [Name] = "A" or [Name] = "B" or [Name] = "C"

 

but this is time consuming and doesn't work when new stores are added. Is there sometging else I can do?

 

Thanks!

 

  • Hi moesteez  

    this is in a table filter (Table.SelectRows), correct?
    To return all rows, simple use true like so:

     

    if #"Store Filter" = "All" then true

     

    Please not that it doesn't come in quotes, as this has to be a boolean value.

     

2 Replies

  • ImkeF's avatar
    ImkeF
    Icon for Community Champion rankCommunity Champion

    Hi moesteez  

    this is in a table filter (Table.SelectRows), correct?
    To return all rows, simple use true like so:

     

    if #"Store Filter" = "All" then true

     

    Please not that it doesn't come in quotes, as this has to be a boolean value.