Forum Discussion
Mischa2710
Apr 16, 2020Copper Contributor
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
- SergeiBaklanDiamond Contributor
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.
- gvpiper777Copper Contributor
SergeiBaklan Thank you for this - a really neat solution - has helped me enormously solve a problem
- SergeiBaklanDiamond Contributor
I'm not an author, it's known for a long while. In any case glad it helped.
- Paul_McCormackCopper ContributorLove this! I can now get rid of some fiddly VBA code which copies selected table records across to a new table.
- JKPieterseSilver ContributorDevious. I must study that AGGREGATE function more!
- SergeiBaklanDiamond Contributor
- JKPieterseSilver ContributorI don't think you can, you must repeat the filtering in PQ.