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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
nniphadk
Frequent Visitor

How do I sort column

Realign.PNG
This is a regular table in Power BI desktop. How do I order it so that it can appear like so

Under 21 years old
between 22 and 25 years of age
between 26 and 30 years of age

2 ACCEPTED SOLUTIONS
tharunkumarRTK
Super User
Super User

@nniphadk 

You need to create a custom sort order column for it. 

Please follow the approach suggested here: https://community.fabric.microsoft.com/t5/Desktop/Sorting-Calculated-Column/m-p/3132467


If the post helps please give a thumbs up


If it solves your issue, please accept it as the solution to help the other members find it more quickly.


Tharun



View solution in original post

Anonymous
Not applicable

Hi ,

Thanks for the solution @tharunkumarRTK  provided and i want to offer some more information for user to refer to.

hello @nniphadk , based on your description, you can refer to the following solution.

Sample data 

vxinruzhumsft_1-1712735905718.png

You can create a measure

Measure = int(MID(MAX('Table'[Age Group]),SEARCH(" ",MAX('Table'[Age Group]),,BLANK())+1,2))

Then put the measure to the filter and sort the measure ascending.

Output

vxinruzhumsft_2-1712736004197.png

 

 

Best Regards!

Yolo Zhu

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

2 REPLIES 2
Anonymous
Not applicable

Hi ,

Thanks for the solution @tharunkumarRTK  provided and i want to offer some more information for user to refer to.

hello @nniphadk , based on your description, you can refer to the following solution.

Sample data 

vxinruzhumsft_1-1712735905718.png

You can create a measure

Measure = int(MID(MAX('Table'[Age Group]),SEARCH(" ",MAX('Table'[Age Group]),,BLANK())+1,2))

Then put the measure to the filter and sort the measure ascending.

Output

vxinruzhumsft_2-1712736004197.png

 

 

Best Regards!

Yolo Zhu

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

 

 

 

tharunkumarRTK
Super User
Super User

@nniphadk 

You need to create a custom sort order column for it. 

Please follow the approach suggested here: https://community.fabric.microsoft.com/t5/Desktop/Sorting-Calculated-Column/m-p/3132467


If the post helps please give a thumbs up


If it solves your issue, please accept it as the solution to help the other members find it more quickly.


Tharun



Helpful resources

Announcements
Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors