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
utsavlexmark
Helper III
Helper III

Custom Sort of New Colum

In my table I have created one colum for "Rang".

If rank is >=1 and <=10 , "Position 1-10",

and so on

Now I wanted to sort the column as

if "Position 1-10" it will come first

if "Position 11-20" it will come next

and so on

What could be the solution for this?

Regards

Utsav 

3 REPLIES 3
v-xiaotang
Community Support
Community Support

Hi @utsavlexmark 

Thanks for reaching out to us.

>> I have created one colum for "Rang". Now I wanted to sort the column as   if "Position 1-10" it will come first  if "Position 11-20" it will come next

-

if "Position 11-20" it will come next, then what is in front of it?

Could you share some sample data and its expected output? thanks

 

 

Best Regards,

Community Support Team _Tang

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

PabloDeheza
Solution Sage
Solution Sage

Hi there!

A solution could be adding another column, lets say RankOrder, where for "Position 1-10" the value is 1, for "Position 11-20" the value is 2 and so on. Once that column is created, you select Rank and got to Column Tools -> Sort by another column and select Rank Order.

PabloDeheza_0-1660826087424.png

Let me know if that helps!

amitchandak
Super User
Super User

@utsavlexmark , Also Create a sort column

 

Switch( True() ,

[Rank] <=10 ,1 ,

[Rank] <=20 ,2 ,

//add others

100

)

 

and use it as sort column for your column Rang

 

How to Create Sort Column and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-c

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.