Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
moesteez
Helper I
Helper I

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!

 

1 ACCEPTED SOLUTION
ImkeF
Community Champion
Community 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.

 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

View solution in original post

2 REPLIES 2
ImkeF
Community Champion
Community 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.

 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

amitchandak
Super User
Super User

@ImkeF , Can you help?

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors