March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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.
Solved! Go to Solution.
Yes, this did turn out to be what @sebastianslz was after:
https://stackoverflow.com/questions/69859428
Here's the screenshot I posted there for reference:
Do you want to change column sort order in visuals on report page? If so, you could use Sort one column by another column in Power BI Desktop feature. Select the concatenated column, sort it by NombreCliente. This is in Power BI Desktop not in Power Query Editor.
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Yes, this did turn out to be what @sebastianslz was after:
https://stackoverflow.com/questions/69859428
Here's the screenshot I posted there for reference:
Can you give an example of what your data looks like before sorting and what it should look like after you sort how you want? I'm not understanding why sorting on [NombreCliente] doesn't give you the order you want.
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 |
OK. [NombreCliente] should still be in your table unless you've deleted it after defining the combined column. Sort the table using that column.
I still have the column [NombreCliente] the order before creating the custom column but it is not sorted. Any other suggestions ?
Try sorting the [NombreCliente] column before concatenating it, but it still does not sort.
Are you looking at the sort in the query editor or are you trying to sort a report visual or something else?
Show me a screenshot of what you are seeing unsorted.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
125 | |
81 | |
63 | |
54 | |
42 |
User | Count |
---|---|
194 | |
106 | |
90 | |
63 | |
51 |