Forum Discussion
admin_xlsior
5 years agoPost Prodigy
Filter one table based on other table still in Power Query
Hi guys, In Advance Query (Power Query) can we filter 1 table based on other table ? For example I have table Products which has column Active (Yes/No). I have filtered this during Transform dat...
- 5 years ago
Hi, admin_xlsior
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Products:
Transcation:
You may add a new step for 'Transcation' table with the following m codes,
= let lst = Table.SelectRows(Products,each [IsActive]="Yes")[ProductID], result = Table.SelectRows(#"Changed Type",each List.Contains(lst,[ProductID])) in resultResult:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
MattAllington
5 years agoCommunity Champion
You will need to do a combine tables with an inner join between the product table and the transaction table. I don't know if you can do this with direct query - I assume you can.