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
Anonymous
Not applicable

How to disable sorting in Table visual

Hi,

 

I want to disable sorting on power BI table visual.By default table needs to be sorted based on first column.

How to achieve this?please help.

1 ACCEPTED SOLUTION
Anand24
Super User
Super User

Hi @Anonymous ,

 

@MFelixgave a wonderful work-around and that should probably suffice your requirement.

You just need to follow below steps:

1. Create a blank button or blank rectangle

2. Place it over the Table columns (Make sure you place the blank button/rectangle infront of table)

3. Group them together

 

I'm not sure if you are using table visual or matrix visual but anyway, the drlling options at top right of visual box will be visible to you and you should be able to drill.

 

With this work-around, you won't be able to perform any operations that are supposed to be related with clicking the table/matrix headers such as sorting in table/matrix and right click -> Drill in matrix.

 

Give a thumbs up if this post helped you in any way and mark this post as solution if it solved your query !!!

View solution in original post

21 REPLIES 21
sseverson12
Frequent Visitor

Hi there,

 

To save future readers some pain, the other answers given here are not correct and will cause serious problems for you if you need to prevent users from sorting using the column headers. The issue is that even if you group the blank button and the table visual together, if a user clicks somewhere else on the table visual (e.g. to scroll or select a row) the table will become selected and the user will then be able to sort using the column headers.

 

Luckily, there is a solution if you put the visuals in separate groups. I found a great explanation here: https://www.youtube.com/watch?v=PKIcjGz_Swg

Hi @sseverson12,

 

Since November 202 there is another option that you can turn on in each visualization to maintain layer order so the visualization will keep the order.

 

Check the explanation in the link below

 

https://www.havensconsulting.net/blog-and-media/using-the-maintain-layer-order-option-to-lock-in-vis...

 

The video is from the same user that you also shared a link. 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Anand24
Super User
Super User

Hi @Anonymous ,

 

@MFelixgave a wonderful work-around and that should probably suffice your requirement.

You just need to follow below steps:

1. Create a blank button or blank rectangle

2. Place it over the Table columns (Make sure you place the blank button/rectangle infront of table)

3. Group them together

 

I'm not sure if you are using table visual or matrix visual but anyway, the drlling options at top right of visual box will be visible to you and you should be able to drill.

 

With this work-around, you won't be able to perform any operations that are supposed to be related with clicking the table/matrix headers such as sorting in table/matrix and right click -> Drill in matrix.

 

Give a thumbs up if this post helped you in any way and mark this post as solution if it solved your query !!!

Anonymous
Not applicable

Hi,

Thanks for sharing this method. It works great for two of my matrix tables.  But it doesn't seem to work on my  third one, which has a lot of columns and I need to use horizontal scroll bar to go to the very end on the right.  

 

Do you have suggestion on how to have it work on a matrix report that has a lot of columns with horizontal bar enabled?

 

Thanks.

 

Hi @Anonymous

The option is still the same only thing you need to garatee is that the shape fills all the wide of the table what I usually do is to create a shape a little large so if the table has 200 of wide I would do the shape with 205 for example. 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

Thank you @MFelix,

 

It looks I have to cover the scroll bars for it to work. But I need to be able to scroll from left to right.

 

 

Hi @Anonymous ,

 

You just need to cover the headers of the table no need to cover the scroll bar has you can see below I have left the border blue so that you could see the shape is until the scroll bar but not touching it and it's only on headers.

MFelix_1-1668537919553.png

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

I know what is happening. I opened Selection pane. So if I directly click in the button covered area, in the selection, it shows I clicked on Group (Name) or Button. Then it is not impacting sorting. But as soon as I clicked on scroll bar, in the selection pane, it shows Matrix being selected and the sorting is then impacted. 

 

In order not to impact sorting, I would need to move my cursor to select either Group name or Button after I click on scroll bars. 

HI @Anonymous ,

 

Forgot to mention one option that you need to have selected in the option that is maintain layer order.

 

MFelix_0-1668539143323.png

 

Be aware that this workaround is for the service, on PBI desktop the workaround will not work because you are on editing mode.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

Thanks @MFelix, will keep it on mind 🙂

negi007
Community Champion
Community Champion

@Anonymous  It may not be possible to disbale sorting option. I think as a workaround, you can draw a line on the top of the sort filter icon. This way sorting option will get hidden when user move cursor over the table which will indirectly disabled option to sort for the user




Did I answer your question? Mark my post as a solution!
Appreciate your Kudos



Proud to be a Super User!


Follow me on linkedin

MFelix
Super User
Super User

Hi @Anonymous ,

 

This is not possible since the sorting option is based on the column headers and it's a default behaviour, what you can do has a workaround is to make your table sorting as you need then create a blank button with the size of your table headers and place it on top of your table visualization then just group both of them and user will not be abble to select the order:

 

button_sortign.gif

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

Thanks for your response.I have applied drill through in that table so will it work once i group button and table that if right click on any row it will drill through to next page? and also i have multiple columns in table so i need to scroll the table.

Hi @Anonymous ,

 

Does the answer of @MFelix  make sense? I think it is the best workaround for your requirement. If it is helpful, please accept it as solution. If you still need help, please feel free to ask us.

 

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

Hi @Anonymous ,

 

I'm not sure about what answer you are refering to, but my answer of creating a button on top of the table will not disable the drilltrough and the scrolling since you should only place the button on top of the headers so to stop the users from clicking the header the scrolling is on the bottom and the drill trough should be made on a cell of the table so everything should work as expected.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



amitchandak
Super User
Super User

Anonymous
Not applicable

Thanks for your reply but It is not working as expected,I want to disable the sort option in Table visual

Anonymous
Not applicable

Hi,

I'm looking for a way to disable the sort option on my column in the visual. Have you found a solution to this ? Would love to know if you did 🙂 

Hi @Anonymous ,

 

To my knowledge, there is still no option to disable the sorting by the column of the table visualization, the workaround has refered is the creation of a shape without fill that would cover the columns and disabling the sorting.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Hello @MFelix 

Please may i know Any Solution you find to disable Sort icon  completely from Column headers or any workarounds other than Blank button Overlap  ?..

 

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.