cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
erp
Frequent Visitor

Sort Text Column in Power BI

How can I Sort my Column in Power BI?

 

My Column is

erp_0-1627626957781.png

I Want it to be in ascending Order. I tried to sort using visual option but no result. Please help me...

2 ACCEPTED SOLUTIONS
alekhved
Resolver II
Resolver II

hi @erp 

 

If the column is Text column, when you pull the column in your visual, click on the "..." on the top right corner. And then select the order in which you want to sort.

 

alekhved_0-1627628781654.png

Thanks,

alekh

View solution in original post

v-jingzhang
Community Support
Community Support

Hi @erp 

 

If you want to sort the column ascendingly by the interger part before "D", you need to add a column for sorting. In Power Query Editor, extract the interger part into a new column: under Add Column, select Extract > Text Before Delimiter and enter D in Delimiter textbox. And change the data type to Whole number

080205.jpg

 

After applying changes into Power BI Desktop, sort the original column by the new column. At last, select Sort ascending on the visual.

080206.jpg080207.jpg

 

I don't add the new column with DAX because it will bring a circular dependency error when sorting the column by the new column. Hope this helps.

 

Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.

View solution in original post

3 REPLIES 3
v-jingzhang
Community Support
Community Support

Hi @erp 

 

If you want to sort the column ascendingly by the interger part before "D", you need to add a column for sorting. In Power Query Editor, extract the interger part into a new column: under Add Column, select Extract > Text Before Delimiter and enter D in Delimiter textbox. And change the data type to Whole number

080205.jpg

 

After applying changes into Power BI Desktop, sort the original column by the new column. At last, select Sort ascending on the visual.

080206.jpg080207.jpg

 

I don't add the new column with DAX because it will bring a circular dependency error when sorting the column by the new column. Hope this helps.

 

Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.

alekhved
Resolver II
Resolver II

hi @erp 

 

If the column is Text column, when you pull the column in your visual, click on the "..." on the top right corner. And then select the order in which you want to sort.

 

alekhved_0-1627628781654.png

Thanks,

alekh

amitchandak
Super User
Super User

@erp , In every visual you have the option under three dots to sort on column and order ,

 

if not you can use sort column of your choice

How to Create Sort Column and Solve Related Errors: https://youtu.be/KK1zu4MBb-c



Features || Datamarts: https://youtu.be/8tskWsJTEpg || Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Learn Power BI P&L Statement || Time Intelligence Decoded : https://youtu.be/aU2aKbnHuWs&t=145s ||
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Dashboard of My Blogs !! Connect on Linkedin !! Subscribe to my youtube Channel !!!! How to get Quick Help !!
Resources | Master Power BI !! Expertise Power BI !! Power BI For Tableau User !!

Helpful resources

Announcements
collabdays lisbon

CollabDays Lisbon - 26 November 2022

Sessions include practical, hands-on experience that will help you take the next step in your career and know-how.

Difinity Conference

Difinity Conference 2022

Difinity is the largest Microsoft Data, AI, Power BI, Power Platform and Business Applications Conference in New Zealand.

European Share Point Conference

European Share Point Conference

This conference returns live and in-person in Copenhagen this 28 November-01 December with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Microsoft 365 Conference â__ December 6-8, 2022

Microsoft 365 Conference - 06-08 December

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.