Forum Discussion

Hokori's avatar
Hokori
Frequent Visitor
1 year ago
Solved

Power Query Import mode with Filter/merge

Hi All, I need to import a table into PQ. The table has 40 mln rows. To maintain the integrity with other tables I need only 50k rows to be imported.  I have 3 tables. let's say A contains city nam...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Yes, do it in Power Query. Use buffered lists for your search values. If you already have the other two tables filtered, use:

     

    = Table.SelectRows(PriorStepOrTableName, each List.Contains(List.Buffer(List.Distinct(Table2[Names])), [ThisTable_NameColumn]) and List.Contains(List.Buffer(List.Distinct(Table1[Cities])), [ThisTable_CitiesColumn]))

     

    --Nate

  • mussaenda's avatar
    1 year ago

    have you tried to do the SQL Statement? You can do the SQL query before importing the table