Forum Discussion
How do I buffer my table in Power Query?
- 6 years ago
I haven't tested it, but it looks like you just need to add Table.Buffer to force PowerQuery to actually sort the table before duplicate removal. Otherwise, PowerQuery has a tendency to try and be too efficent, in this case, removing a bunch of rows and sorting the smaller dataset, which is great from a performance standpoint.
You should be able to update your advanced query with the items in blue:
#"Sorted Rows" = Table.Sort(#"Changed Type1",{{"Application Date", Order.Descending}}), #"Buffer Sorted Table" = Table.Buffer(#"Sorted Rows"), #"Removed Duplicates" = Table.Distinct(#"Buffer Sorted Table", {"DSI"}),If this doesn't make sense, or doesn't actually work, you can try the solution that was talked about in message #6 of the thread you linked. That method is going through and finding the distinct rows yourself instead of letting Table.Distinct do it for you (and potentially get it wrong)
I haven't tested it, but it looks like you just need to add Table.Buffer to force PowerQuery to actually sort the table before duplicate removal. Otherwise, PowerQuery has a tendency to try and be too efficent, in this case, removing a bunch of rows and sorting the smaller dataset, which is great from a performance standpoint.
You should be able to update your advanced query with the items in blue:
#"Sorted Rows" = Table.Sort(#"Changed Type1",{{"Application Date", Order.Descending}}),
#"Buffer Sorted Table" = Table.Buffer(#"Sorted Rows"),
#"Removed Duplicates" = Table.Distinct(#"Buffer Sorted Table", {"DSI"}),
If this doesn't make sense, or doesn't actually work, you can try the solution that was talked about in message #6 of the thread you linked. That method is going through and finding the distinct rows yourself instead of letting Table.Distinct do it for you (and potentially get it wrong)
- jhartranft606 years agoAdvocate IV
Thanks Cmcmahan , this is exactly what I needed! Worked perfectly! I figured it'd be simple, but didn't want to mess up the syntax.
Appreciate the assist!