Forum Discussion

admin_xlsior's avatar
admin_xlsior
Post Prodigy
5 years ago
Solved

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...
  • v-alq-msft's avatar
    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
    result

     

     

    Result:

     

    Best Regards

    Allan

     

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