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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Alexo3627
Frequent Visitor

Pin rows in table

Hello, I would like to pin the first two rows of the table; but when you click on the header the columns get out of order:

TOTAL AMERICA and CONTINENTE should always be at the beginning in that order.

 

Alexo3627_1-1717434039366.png

when I click on growth, the order should only affect (NORTH AMERICA, CENTRAL AMERICA; ANTILLAS and SOUTH AMERICA), and I want TOTAL AMERICA and CONTINENTE to stay at the top

Alexo3627_2-1717434112988.png

Regards,

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Alexo3627 ,

I think the first thing you need to understand is that when you click on a column, all the other columns in Power BI Desktop are sorted with the column you clicked on.

In Power BI Desktop, there is a close correlation between columns and rows. I have given an example.

vyilongmsft_0-1717559287106.png

The need to write a DAX code on top of the original table to get the sorting situation you need can be met.

Sort Order Column = 
SWITCH(
    TRUE(),
    'Table'[REGIONES] = "TOTAL AMERICA", 1,
    'Table'[REGIONES] = "CONTINENTE", 2,
    3 
)

vyilongmsft_1-1717559394328.png

 

 

 

Best Regards

Yilong Zhou

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

3 REPLIES 3
Anonymous
Not applicable

Hi @Alexo3627 ,

I think the first thing you need to understand is that when you click on a column, all the other columns in Power BI Desktop are sorted with the column you clicked on.

In Power BI Desktop, there is a close correlation between columns and rows. I have given an example.

vyilongmsft_0-1717559287106.png

The need to write a DAX code on top of the original table to get the sorting situation you need can be met.

Sort Order Column = 
SWITCH(
    TRUE(),
    'Table'[REGIONES] = "TOTAL AMERICA", 1,
    'Table'[REGIONES] = "CONTINENTE", 2,
    3 
)

vyilongmsft_1-1717559394328.png

 

 

 

Best Regards

Yilong Zhou

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

Anand24
Super User
Super User

@Alexo3627 ,
Like @parry2k rightly said, this is not possible right now in Power BI visuals (both Table and Matrix). 
As a work-around, you will need to create 2 tables and format in a way that it appears to be one. But again, you won't be able to sort all of them together with this work-around. This work-around will hold good if the table structure and sorting will remain same.

parry2k
Super User
Super User

@Alexo3627 I don't think there is a way to pin the rows. It might be possible with some disconnected tables but not straightforward forward and also that will be a matrix visual. 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors