Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi,
I am using = Table.SelectRows(Table1, each List.Contains(List, [UID])) to filter out 300 categories from a table that has 1.6mil rows. However, it is loading very slow when I apply the query whereas the 1.6mil row table has already finished loading. Theorectically, the new table should have less than 1.6mil rows, but why is it taking forever to load? Is there a better way doing it?
Thanks!
Daren
Solved! Go to Solution.
Hi @Anonymous ,
Are you using a direct query mode?Why not filter the table in table view?
Hi @Anonymous
this could be caused by the list not being buffered.
So whatever step you're referencing with "List", make sure to wrap it into a List.Buffer-function.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
I would like to know how many items a buffered list can perform well before starting to get slow when called inside a "List.Contains" function. I tried with about 5k items and it seems good, but not with 350K items.
I usually use buffered lists to filter values in tables with codes like this:
If List.Contains(list, [field]) then true else false
Thanks in advance.
Hi @Anonymous ,
Are you using a direct query mode?Why not filter the table in table view?
I am using import mode. I could do the filter in table view using LOOKUPVALUE. Is there a difference between the filter in table view vs query mode in terms of performance and speed?
Daren
Hi @Anonymous ,
If you use M query for calculation,it will only keep the last data after being filtered,and the calculation will be executed in each rows.But if you choose to filter in table view,it wont destroy the data integrity,1.6mil rows of data will still stored in memory and you can first make a filter to pick out the data you need for calculation,no need to execute it in each rows,which will shorten the time for calculation.
However,if it's a need to do a M query,better refer to @ImkeF 's suggestion,this will also help to reduce the time.
Likely having to do some kind of table scanning. @ImkeF ?
User | Count |
---|---|
79 | |
74 | |
63 | |
45 | |
44 |
User | Count |
---|---|
101 | |
43 | |
39 | |
39 | |
36 |