Forum Discussion
Anonymous
4 years agoNot applicable
How to remove duplicate with if else condition
Hi all, Want to ask how can I remove duplicate with if else condition? Do it have some formula for that? Current data Data that I want it to be view in powerbi I ...
stenford23
4 years agoHelper I
Table.Distinct(
Table.Buffer(
Table.Sort(
original_table,
{"End Time", Order.Ascending}
)
), {"Usage (Unit)}"
)
Sort by End date (add start date also if you need it), Buffer it (otherwise it won't work) and get distinct.
Anonymous
4 years agoNot applicable
- stenford234 years agoHelper I
Yes Anonymous insert this code in advanced editor
replace original_table with previous step name
- Anonymous4 years agoNot applicable
Hi stenford23 ,
Sorry I dont quite understand. Please refer as below for my advanced editor
Regards,
Nuha
- stenford234 years agoHelper I
Replace the code i give to you with
drop_duplicates = Table.Distinct( Table.Buffer( Table.Sort( #"Expanded SAP__PPT_EV_ProductionOrderConfirmationAdd (3)", {"End Time", Order.Ascending} ) ), {"Usage (Unit)}" ) in drop_duplicatesChange also what comes after "in" by replacing it with drop_duplicates (as in the code above)