Forum Discussion
sbadiger3
2 years agoHelper I
How to remove rows based on a condition
Hi everyone, I have a table in power query. There is column in the table by name 'order_line_id'. This column has duplicates which ideally shouldn't. I need to remove the rows with duplicate order_li...
Vijay_A_Verma
2 years agoMost Valuable Professional
When you are using Table.Distinct to remove after adding Index column and sorting on descending of Index column, you will need to buffer the table. Example is below where #"Sorted Rows" was my previous step.
= Table.Distinct(Table.Buffer(#"Sorted Rows"), {"order_line_id"})
- sbadiger32 years agoHelper I
Vijay_A_Verma What exactly does buffer do?
- Vijay_A_Verma2 years agoMost Valuable Professional
This is explained here very well - https://www.daytodatastuff.co.uk/blog/m-deepdive-buffer