Home > Software engineering >  How to sort alphabetize a concatenated column
How to sort alphabetize a concatenated column

Time:11-06

I would like to sort alphabetize a column that is concatenated with another, that is, I am creating a custom column in which I am concatenating two columns.

The custom column formula I am using is the following:

= [IdCliente] & " - " & [NombreCliente]

The column I'm interested in alphabetizing is [NombreCliente]

Try to sort the column by [NombreCliente] making use of the function Order.Ascending as follows:

= [IdCliente] & " - " & Order.Ascending [NombreCliente] 

But this is generated by an error indicating the following:

Expression.Error: Cannot apply field access to type Number.
Details:
    Value=0
    Key=NombreCliente

Any suggestion to correctly sort my column alphabetically.

UPDATE 1:

This is an example of how you would like the ordered data to look

It is important to bear in mind that the value A0002 comes from the column [IdCliente] and the CEST value comes from the column [NombreCliente]

|Not Order      |Order
|-----------------------------      
|A0002 - CEST   |A0012 - ARCET
|-----------------------------
|A0012 - ARCET  |A0002 - CEST
|-----------------------------
|A0015 - FULL   |A0015 - FULL

UPDATE 2:

I have arranged alphabetically the column [NombreCliente] in Power Query but when transferring it to a table the same order is maintained taking into account the [IDCliente] column.

enter image description here

CodePudding user response:

Click the dropdown on the [NombreClient] column and choose Sort ascending.

Screenshot

If you're using this column in a visual, then you have to use the Sort by Column

That will then be used as the default sort order:

enter image description here

  • Related