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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
The_Stein
New Member

Filter based on values from other query

I'm trying to filter a column based on the values from another query or List.

 

Step 1: Filter  Column 1 = null   -  = Table.SelectRows(#"Expanded Sheet1 (2)", each ([JOURNAL_NAME] = null))

 

Step 2: Filter Accounts based on Distinct list in another table/Query

Table/Query 1 - #"Delta Filter".Account

Filter values that are in #"Account Codes Distinct".Account  (Distinct List)

 

Step 3: Similar to Step 2 but now filter on the Product Codes

 

I can not get Step 2 or 3 to work.  I've tried List.Contains function and table functions.  I'm open to creating a new column to show true false on the match.  

 

The_Stein_0-1636694709445.png

 

The_Stein_1-1636694904364.png

 

Thank you.  #Beginner 

2 REPLIES 2
Anonymous
Not applicable

Hi @The_Stein ,

 

I agree with @ImkeF . When you need to do something based on other tables , the easiest way is to Merge these tables then expand columns , and after doing transformation , remove the unnecessary columns.

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

ImkeF
Community Champion
Community Champion

Hi @The_Stein ,
I would merge these queries in the modus of an inner join.
This will effectivly work as a filter where entries on both merge columns must match.

 

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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