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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
fansari
New Member

How to Create Dynamic Top 10 Columns in Matrix

Hello,

 

Essentially, my data has two country columns: producing country and policy country. Every cell in the data has a non-blank pair of producing country and policy country. In addition, every cell has a whole number value for Rework (0, 1, ...).

 

I am attempting to make a dynamic matrix displaying the top 10 policy countries by avg rework for the most recent quarter in the rows, and the corresponding top 10 producing countries by avg rework in the most recent quarter for those top 10 policy countries in the columns. The only partial solution I have found so far is to create a new calculated column that statically assigns each producing country a rank:

 

fansari_0-1706193358709.png

 

The top 10 policy countries by avg rework are correct and sorted correctly, and the corresponding top 10 producing countries by avg rework for those top 10 selected policy countries are correct. However, the producing country sort is not correct. It seems to be using the static, pre-defined calculated column rank, as displayed by the numbers on top. Is there a way to have the sorting change dynamically to keep the high to low producing countries in order from left to right?

1 ACCEPTED SOLUTION
Daniel29195
Super User
Super User

@fansari 

you need to add the rank as measure in the matrix, and you can then sort base on it . 

 

you can do it like this https://www.youtube.com/watch?v=1bp_e-ik7aA  

i think it could be done for you, since you have limited nb of columns ( = 10 ) , so you can hide them using this technique . 

 

 

 

If my response has successfully addressed your issue kindly consider marking it as the accepted solution! This will help others find it quickly. I would appreciate hitting that kudos button 👍🤠

View solution in original post

1 REPLY 1
Daniel29195
Super User
Super User

@fansari 

you need to add the rank as measure in the matrix, and you can then sort base on it . 

 

you can do it like this https://www.youtube.com/watch?v=1bp_e-ik7aA  

i think it could be done for you, since you have limited nb of columns ( = 10 ) , so you can hide them using this technique . 

 

 

 

If my response has successfully addressed your issue kindly consider marking it as the accepted solution! This will help others find it quickly. I would appreciate hitting that kudos button 👍🤠

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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