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! Request now

Reply
Ayappan
Helper III
Helper III

can we remove default sorting option in data table power bi

Hi Team ,

    I have a table like below. This is how it comes in Transform data..

P1Copper
P1Arrow
P1Zinc
 Copper
P2Arrow
P2Zinc
P3Copper
P3Arrow


But when i select this column in DataTable it is sorting 

 

P1Arrow
P1Copper
P1Zinc
P2 Arrow
P2Copper
P2Zinc
P3Arrow
P3Copper

 

I  Wanted in same order ...How to do it ..please guide me .

Thanks 

1 ACCEPTED SOLUTION
KeyurPatel14
Responsive Resident
Responsive Resident

Hi @Ayappan ,
I have implemented the same scenario just like yours.
I can not say tha this is the ideal way to do this but if you can not find anyway then this might help you.

1. I added one index column in Power Query and gave the name as . as shown in below image.
For adding index column, Go to Power Query --> Add Column Tab --> General Section --> Index Column.

KeyurPatel14_0-1678435556728.png

2.Close and apply Power Query.
3.Take a table visual in PowerBI Desktop and add all the 3 fields and sort it by clicking on . column (which we added using Power Query) as shown in below image.

KeyurPatel14_1-1678435780719.png

4. Now make the last column very small that it can not be visible by dragging it towards left.
5. After all the steps it will look like the below image.

KeyurPatel14_2-1678435908777.png


I know there might be many ideal ways to do this but if this post helps you or you find it intresting then give it a kudos and mark it as a solution.

Thank You.

View solution in original post

3 REPLIES 3

Use columnDefs option to remove sorting from a column. Pass column index in targets within [] (Indexing starting from 0) and set orderable to false . In the example, I removed sorting from email and salary column.

Regards,

Rachel Gomez

FrankAshby
Regular Visitor

As @KeyurPatel14 suggested an index column would probably solve this. Don't forget to set the sort order by the index column, otherwise wasting time/effort 😅

Basic, but does the job.

KeyurPatel14
Responsive Resident
Responsive Resident

Hi @Ayappan ,
I have implemented the same scenario just like yours.
I can not say tha this is the ideal way to do this but if you can not find anyway then this might help you.

1. I added one index column in Power Query and gave the name as . as shown in below image.
For adding index column, Go to Power Query --> Add Column Tab --> General Section --> Index Column.

KeyurPatel14_0-1678435556728.png

2.Close and apply Power Query.
3.Take a table visual in PowerBI Desktop and add all the 3 fields and sort it by clicking on . column (which we added using Power Query) as shown in below image.

KeyurPatel14_1-1678435780719.png

4. Now make the last column very small that it can not be visible by dragging it towards left.
5. After all the steps it will look like the below image.

KeyurPatel14_2-1678435908777.png


I know there might be many ideal ways to do this but if this post helps you or you find it intresting then give it a kudos and mark it as a solution.

Thank You.

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