Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ovonel
Post Prodigy
Post Prodigy

SortByColumn SSAS not working

I am in SSAS: 

I have column Name, but I want to sort by Id because when in Power BI, it automatically groups by people with same name, but they are in fact different people.

 

I have 2 tables: Clients and Current Client.

 

Client is a table and Current Client is a calculated table…

 

I am able to do it in Client, but not in the calculated table Current Client, Why is this?  I get the error….

ovonel_0-1626357464127.png

 

Cannot sort Name by Id because at least one value in Name has multiple distinct values in Id. For example, you can sort [City] by [Region] because there is only one region for each city, but you cannot sort [Region] by [City] because there are multiple cities for each region…

 

Well, yes, that’s the very reason I want to sort!!

 

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

The cause of the error, as you described.

If there are multiple different values for the same item, it cannot be sorted by the column.

What we can try to do is to modify one item corresponding to one value by concatenate different columns, so that we can use SortByColumn.

Here is a sample, hope it will help you

View solution in original post

1 REPLY 1
V-lianl-msft
Community Support
Community Support

The cause of the error, as you described.

If there are multiple different values for the same item, it cannot be sorted by the column.

What we can try to do is to modify one item corresponding to one value by concatenate different columns, so that we can use SortByColumn.

Here is a sample, hope it will help you

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.