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
Anonymous
Not applicable

Sorting - Power BI DEsktop

Hi,

 

I've got a table below:

Books1 moth3 moth
Harry Potter 13412
Benchmark2345
Outperformance-1133
   
Shantaram3056
Benchmark2378
Outperformance-722

 

 

How can I get the sorting order to first display book name, then benchmark ad then outperformance? Some benchmarks are names (Eg: ASX) instead of Benchmark and therefore I cant use sort by ascending order. When I use another column for sort order  and assign each of them 1,2 and 3 Power BI throws an error. (There cant be more than one value in Orering for the same value in Book_name')

 

Any advice is greatly appreciated.

 

Thansk,

ara_4

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @Anonymous ,

 

It is suggested that you add the index column into the visual to sort.

33.png

 

The index column can be created in the Power Query Editor.

34.png

 

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-stephen-msft
Community Support
Community Support

Hi @Anonymous ,

Could you tell me if your problem has been solved?
If it is, kindly Accept it as the solution. More people will benefit from it.
Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.


Best Regards,
Stephen Tao

v-stephen-msft
Community Support
Community Support

Hi @Anonymous ,

 

It is suggested that you add the index column into the visual to sort.

33.png

 

The index column can be created in the Power Query Editor.

34.png

 

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , I you table create a column sort order

 

Books 1= [Books]

 

book sort =

Switch (True() ,

[Books] = " benchmark",2,

[Books]= "outperformance",3,

1

)

 

Sort Books 1 on book sort and use books 1 in visual

https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

Anonymous
Not applicable

Hi @amitchandak 

I get a circular dependency error.

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.