Forum Discussion
Anonymous
3 years agoNot applicable
Swapping the values
Hi, I have two columns, Id and name with multiple values with delimitor and jumbled.I need to arrange it in order in power query editor or using DAX. Need your help to sort out the issue. Input: ...
slorin
Super User
3 years agoAnother solution with Table.ReplaceValue
= Table.ReplaceValue(PrevStep,each [ID],each [Names],(a, b, c)=>
Text.Combine(
List.Sort(
Text.Split(c,"|"),
(x,y) =>
Value.Compare(
List.PositionOf(Text.Split(b, "|"), Text.BetweenDelimiters(x, "(", ")")),
List.PositionOf(Text.Split(b, "|"), Text.BetweenDelimiters(y, "(", ")"))
)
),
"|"
),
{"Names"})
Stéphane