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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

How to keep the data sort the same with Datasource?

Hi All, I meet a problem, the data of column A in excel has the sort but the sort is not by ASC or DESC, is set by user as business requierement, e.g., the sort of the column A is as below:

Column A
One
Two
Three

 

But, after we get the excel and import to Power BI desktop, the data sort will be changed, and can only sort as ASC or as DESC:

20200225.png

So my question is can we make the sort be same with the original data? Thanks

 

 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

It works, thank you very much!

View solution in original post

7 REPLIES 7
Greg_Deckler
Community Champion
Community Champion

You need a second column that defines the correct sort. Then you can set your column to have a Sort By of your second column.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hi @Anonymous ,

 

Normally a workaround for this is to add a new index column next to the Column A, then you can sort by this new index column.

 

Please try to use below method:

How to keep the data sort the same with Datasource.PNG

 

Aiolos Zhao

amitchandak
Super User
Super User

You can choose sort column of your choice. Or refer to my Direct Query blog in my signature

Sort_by_column.png

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak  in this way, then need to display the sorted column, too. So for the case that we need to add an index column to do the sort, then seems not perfect to display the index column out in a table or Matrix.

Anonymous
Not applicable

Hi @Anonymous ,

 

Actually you don't need to show the index column in your table, after you created the index column,

 

1. select the column that you want to sort in the front-end

2.click the button in below screenshot

3.choose the index column that you created

 

then you will found that you don't need to show the index column in your table, and the table will sort by the index column

 

 Please try.

 

Aiolos Zhao

 

How to keep the data sort the same with Datasource 2.PNG

Sort column takes care internally. You do not have to anything other than sort on your main column.

 

This is what we do

Month Year = format(Date,"MMM-YYYY")

Month year Sort = format(Date,"YYYYMM") // We make this as sort column of the month year

 

In visual we go and sort on Month Year. But power bi sort it on Month year Sort 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

It works, thank you very much!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors