Delimited list of values, sorted

Hi all,

I just watched a lecture on how to create a delimited list of values in Power Query. The lecture was fantastic, and the knowledge given was beautiful, sadly, I want to add a step in the code, but I do not know how.

  • How do I make all the words and/or numbers displayed in a sorted cell to be sorted, either ascending or descending ? I tried plugging "Order.Ascending " in various places of the code but without any success.

Lecture’s link:

Lecture’s code

Source = Table.Distinct(Sales_Data[[Customer Index], [Product Index]]),
#“Grouped Rows” = Table.Group(Source, {“Customer Index”}, {{“All Rows”, each , type table [Customer Index=nullable number, Product Index=nullable number]}}),
#“Added Custom” = Table.AddColumn(#“Grouped Rows”, “Products”, each [All Rows][Product Index]),
#“Extracted Values” = Table.TransformColumns(#“Added Custom”, {“Products”, each Text.Combine(List.Transform(
, Text.From), “|”), type text})
#“Extracted Values”

Hi @Roboboboberts,

You can add the List.Sort function before Extracting the values, like illustrated below:

I hope this is helpful.

Thank you @Melissa.