Forum Discussion
Need help on removing duplicates records from columns
Hi I want to remove duplicates from A column without impaction on other column
What do you exactly mean "without impaction"? Provide expected result based on sample data please.
- KuntalSingh2 years ago
Helper V
I want output as mention below
Scripts CompanyCode FiscalYear DocumentNumber S(0-25)-1 US29 2024 5101197126 S(25-60)-1 US29 2023 5100017080 S(25-60)-2 US28 2024 5101413528 S(25-60)-3 US28 2024 5101491591 S(25-60)-4 US28 2024 5101566015 S(60-87)-1 US28 2024 5101567516 S(60-87)-2 US28 2024 5101752521 S(60-87)-3 US28 2024 5101874011 S(60-87)-4 US29 2024 5101149040 S(60-87)-5 US29 2024 5101984655 S(87-100)-1 US28 2024 5101413527 S(87-100)-2 US28 2024 5101575516 S(87-100)-3 1000 2024 5135751891 S(87-100)-4 1000 2024 5135751741 S(87-100)-5 1000 2023 5132476310 1000 2024 5135737969 1000 2024 5135738340 1000 2024 5135513389 US28 2024 5100822034 US28 2024 5101126254 US28 2024 5101239148 US28 2024 5101580014 1000 2023 5133914906 1000 2024 5135751575 1000 2023 5133931734 1000 2024 5135737845 1000 2024 5135726814 1000 2024 5135726814 US28 2024 5100826506 US28 2024 5100961501 1000 2024 5134521776 1000 2024 5134521776 1000 2024 5135336621 1000 2024 5135738154 US29 2024 5100937885 US29 2024 5101564525 US29 2024 5101111176 US28 2024 5100965506 US28 2024 5101205008 US29 2024 5101370510 US29 2024 5101863010 US29 2024 5100864027 US29 2024 5100944811 US29 2024 5100966594 US29 2024 5101044675 US29 2024 5101347670 US29 2024 5101626518 US28 2024 5100933537 US28 2024 5101691527 US28 2024 5100924846 US28 2024 5101526515 US28 2024 5100905981 US28 2024 5101331567 US28 2024 5100935615 US28 2024 5102247526 US28 2024 5100905980 US28 2024 5101008552 1000 2024 5135696691 1000 2024 5135696691 US28 2024 5100905979 US28 2024 5101510053 US28 2024 5100822035 US28 2024 5101838516 US28 2024 5101150544 US28 2024 5102247525 US28 2024 5101410515 US28 2024 5101572028 US28 2024 5101580055 US28 2024 5101788006 US28 2024 5100909529 US28 2024 5101166021 1000 2024 5135612369 1000 2024 5135737801 1000 2024 5135737802 US28 2024 5101098580 US28 2024 5101118052 US28 2024 5101455522 US29 2024 5100978139 US29 2024 5101018840 US29 2024 5101253032 US29 2024 5101514525 US29 2024 5100944810 US29 2024 5101227037 US29 2024 5101239571 US29 2024 5101525527 US28 2024 5100831045 US28 2024 5101525527 US28 2024 5100895316 US28 2024 5101036100 US28 2024 5102264500 US28 2024 5100905191 US29 2024 5100942062 US29 2024 5101100656 US29 2024 5101525526 US29 2024 5101745551 US29 2024 5100921753 US29 2024 5100979147 US29 2024 5101125635 US29 2024 5101488517 US29 2024 5100990601 US29 2024 5101100655 US29 2024 5101505529 US29 2024 5101971721 US29 2024 5100903653 US29 2024 5101148170 US29 2024 5101760016 US29 2024 5102108092 US29 2024 5101239533 US29 2024 5101514524 US29 2024 5101572121 US29 2024 5102108093 US29 2024 5100952867 US29 2024 5101147145 US29 2024 5101507031 US29 2024 5101817530 1000 2024 5135670369 1000 2024 5135670369 US28 2024 5100947882 US28 2024 5101020581 US29 2024 5100966171 US29 2024 5101749023 US29 2024 5101119120 US29 2024 5101232192 US29 2024 5100977682 US29 2024 5101741563 US28 2024 5100877090 US28 2024 5101177617 US28 2024 5100993628 US28 2024 5101315626 US28 2024 5100942417 US28 2024 5101072040 US28 2024 5100942418 US28 2024 5101124138 US29 2024 1700262501 US29 2024 1700290000 1000 2023 5132526004 1000 2024 5135751831 1000 2023 5132476310 1000 2024 5135737969 1000 2024 5135738340 1000 2024 5135513389 US28 2024 5100822034 US28 2024 5101126254 US28 2024 5101239148 US28 2024 5101580014 1000 2023 5133914906 1000 2024 5135751575 1000 2023 5133931734 1000 2024 5135737845 1000 2023 5133931737 1000 2024 5135737848 1000 2024 5135726814 1000 2024 5135726814 US28 2024 5100826506 US28 2024 5100961501 1000 2024 5135336621 1000 2024 5135738154 US29 2024 5100937885 US29 2024 5101564525 US29 2024 5101111176 US28 2024 5100965506 US28 2024 5101205008 US29 2024 5101370510 US29 2024 5101863010 US29 2024 5100864027 US29 2024 5100944811 US29 2024 5100966594 US29 2024 5101044675 US29 2024 5101347670 US29 2024 5101626518 US28 2024 5100933537 US28 2024 5101691527 US28 2024 5100924846 US28 2024 5101526515 US28 2024 5100905981 US28 2024 5101331567 US28 2024 5100905980 US28 2024 5101008552 US28 2024 5100935615 US28 2024 5102247526 US28 2024 5100905979 US28 2024 5101510053 US28 2024 5101150544 US28 2024 5102247525 US28 2024 5100822035 US28 2024 5101838516 US28 2024 5101580055 US28 2024 5101788006 US28 2024 5101410515 US28 2024 5101572028 US28 2024 5100909529 US28 2024 5101166021 US28 2024 5101098580 US28 2024 5101118052 US28 2024 5101455522 1000 2024 5135612369 1000 2024 5135737801 1000 2024 5135737802 US29 2024 5100978139 - dufoq32 years ago
Community Champion
Like this?
Output based on 1st post sample data:
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("jZdbaiNBDEX34q8JpEGPUkm1jjBfYfa/jbntkHa7rC6L4BjMsSxdPfv7+/b1hzaxj41vn7e/XzLwJiQNb8bEPJyl3/59XoH6AxKxU1AGxrPFxmr4rAAOtsEF0HrHvxLoxmkwE+gmJpWfDm/QaCHPoWMb1FJ5JnBE61YJ5q6jV6J2e0QttnX6IfeknUkFyHEo/o70tiR/6kKleVemkk310UeNDG0lm3hpJDZfVKIQIW0FktEPYiVSdHCLCmmBBkpsvui5WxxUzSZeJZvKnsWe5ija0uZBSo91RO/ILEfdsthfydHZqFLJDX3uPtmUNEeK+SEVkkaTxl6xSS40V/LCZlRsMkDNydOswbimvZBnlS7IQbtyT6RejCUytgqJxJNESo6X2KlLgWTA3XqFxIS3OZs56c0wR0p+opZMS6Sjj70UkVjXXM+JbBE2V12qPA0aJqOSI8ZqlTz2bH6W8h4aL/voSnmxdex65F1Nl8r/ktivKOeaSoY0lSoZdJb32ubKyWxzXfiJe2GeirmfQoZElWxKwx1Sih0zudTvdz2jUkuIfD/VSjbV+nyH5DYJ/T5fF9c2SxEJjpurGTJ3hzviL3UctlGxi4f2i/lZ2FwXNpPNdaFnsrkWNkt+Zpsrn5/RGx3Hb/iGjz42ezJ6b3isN8PJdEg/of5sVQa+IEv0eNwZaCWtOACyGa0dOD1EvUN/fe34O3b3Gm0YoldWT75CJazuTlVUpRzWrtba118UDwyXDkxhhY5KWPdFEpSjyYTmRsc9+AaFWiMrwuzGdeZMgQurUUPRgTaqVlFauVjz1jVFc9fQHo/Vs0bDT/XaaQv/2Nqd1LOrSFPDrDqmwJI0R2/1EhnyyOqSxNa1Y649kU/TCvUMN7F8CiThgtNRIZnwJBRS+vURLmlEM+msj61/ItPrhEeVFCqphOhHL0XUXEYe0ZQj3k/y/S789x8=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Scripts = _t, CompanyCode = _t, FiscalYear = _t, DocumentNumber = _t]), DistinctScripts = List.Distinct(Source[Scripts]), Custom1 = Table.FromColumns( {DistinctScripts} & Table.ToColumns(Table.RemoveColumns(Source, {"Scripts"})), Value.Type(Source) ) in Custom1- KuntalSingh2 years ago
Helper V
Thanks for your quick response.
This is my code
let
Source = Excel.Workbook(File.Contents("C:\Users\KUNTALSINGH\Box\PepsiCo - NA Process Session\ACL Output file.xlsx"), null, true),
Inputsheet_Sheet = Source{[Item="Inputsheet",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(Inputsheet_Sheet, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Scripts", type text}, {"Source", type text}, {"Vendor", Int64.Type}, {"VendorName", type text}, {"CompanyCode", type text}, {"FiscalYear", Int64.Type}, {"DocumentType", type text}, {"DocumentDate", type date}, {"PostingKey", Int64.Type}, {"PostingDate", type date}, {"DocumentNumber", Int64.Type}, {"Reference", type text}, {"Amountindoccurr", type number}, {"Documentcurrency", type text}, {"Amountinlocalcurrency", type number}, {"LocalCurrency", type text}, {"Clearingdate", type text}, {"Text", type text}, {"Netduedate", type text}, {"Value", type text}}),
#"Removed Other Columns" = Table.SelectColumns(#"Changed Type",{"Scripts", "CompanyCode", "FiscalYear", "DocumentNumber"}),
DistinctScripts = List.Distinct(Source[Scripts]),
Custom1 = Table.FromColumns( {DistinctScripts} & Table.ToColumns(Table.RemoveColumns(Source, {"Scripts"})), Value.Type(Source) )
in
Custom1I am getting mention below error