Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi
Just wondering from a performance issue, which method is better and why? Using a 'inner' merger between two tables or filtering a table using a list.
I usually get requests to do a report based on a certain group of customers, and yet the customer table is very large. So, I usually filter the sales table down to just the chosen customers. Both methods mentioned above work, but which is the best practice method? Another option is to load the full table and use DAX to filter for the group of customers. That method does not seem correct to me as that would have power query loading unnecessary records.
I believe the method of using list to filter a table, keeps the query native, so that’s a positive.
Thoughts
Solved! Go to Solution.
Hi @IamTDR ,
You could also use query parameters to filter data before loading :
https://docs.microsoft.com/en-us/power-query/power-query-query-parameters
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
It depends. The distinct buffered list is wonderful:
= Table.SelectRows(table, each List.Contains(List.Buffer(List.Distinct(NameOfFilterListOrColumn)), [NameOfThisTableColumn]))
That's a very fast filter. But a well indexed db can be pretty fast using an inner join.
As the poet said, "It depends."
--Nate
Thanks I'll try to add the List.Buffer to the code.
Hi @IamTDR ,
You could also use query parameters to filter data before loading :
https://docs.microsoft.com/en-us/power-query/power-query-query-parameters
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Thanks
This does seem like another option to filter a table by another query within power query.
I guess all three options performance is the same?
Hi @IamTDR ,
Is your issue solved now?Could you pls mark the reply as answered to close it?
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Hi @IamTDR ,
Not exactly,parameters can be used in more senarios,as mentioned in the document,query parameter can be used for functions,when you need a complex filtering with your data ,it would be a best choice.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.