Forum Discussion

Mischa2710's avatar
Mischa2710
Copper Contributor
Apr 16, 2020

Power Query only load filtered rows

I´ve a spreadsheet with filtered rows. I´d like to load only the already filtered data to PowerQuery. 

Is there a way to do this?

17 Replies

  • SergeiBaklan's avatar
    SergeiBaklan
    Diamond Contributor

    Mischa2710 

    In addition. Not repeat in Power Query exactly the same set of filters as in Excel table you may add helper column to the Table as

    =(AGGREGATE(3,5,[@A])=1)+0

    there [A] is any column within the table assuming it has no blank values. Similar could be for the range. Formula returns 1 for visible rows and 0 for hided ones.

     

    Within the PowerQuery as first steps filter result on zero for this column and remove it. That shall work for any filter applied in Excel sheet.

    • Paul_McCormack's avatar
      Paul_McCormack
      Copper Contributor
      Love this! I can now get rid of some fiddly VBA code which copies selected table records across to a new table.
    • JKPieterse's avatar
      JKPieterse
      Silver Contributor
      Devious. I must study that AGGREGATE function more!

Resources