Forum Discussion

morand's avatar
morand
New Member
9 years ago
Solved

How to sort Sharepoint list values

I've uploaded a table from Sharepoint and i have a column with multiple values.

I used extract valuses by semicolon to see the actual values - but the values are not ordered.

The problem I'm having is that PowerBI see 2;5 and 5;2, for example, as different values. 

 

Is there a way to sore the column values so 5;2 will be transformed to 2;5 also?

 

  • Anonymous's avatar
    Anonymous
    9 years ago

    Hi morand,

     

    You can refer to below formula to sort the items which in one cell.

     

    Power query formula:

     

    #"Added Custom" = Table.AddColumn(#"Changed Type", "Sorted", each Text.Combine(List.Sort(Text.Split(Text.From([Value]), ";"),Order.Ascending),";"))

     

    Result:


    Regards,

    Xiaoxin Sheng

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi morand,

     

    You can refer to below formula to sort the items which in one cell.

     

    Power query formula:

     

    #"Added Custom" = Table.AddColumn(#"Changed Type", "Sorted", each Text.Combine(List.Sort(Text.Split(Text.From([Value]), ";"),Order.Ascending),";"))

     

    Result:


    Regards,

    Xiaoxin Sheng