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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
ksrini
Helper I
Helper I

Sorting and Ranking in a Matrix table

Hi All,

 

I need to create a summary table on product sales by countries and sort products by their sales in descending order. Products are in columns and regions are in rows. I also need to color top 2, 3-5 and 6-8 countries in each product. The below table is only a sample and i have much bigger table. From the below table, i am trying to get to sorting stage in which Product 3 should be the left most in the table and Product 7 has to be the last one. 

 

Regarding coloring the cells in the Product 1 column, cells with 9 and 7 should be colored green because they are top 2 and 5 and 4 should be lighter green and the next 2 ranked ones should be more lighter green. I tried few ways to sort like sorting by other column etc but i am not able to solve it. Can any guide me on this ?  

 

CountryProduct 1Product 2Product 3Product 4Product 5Product 6Product 7Product 8
USA59628 83
India 357 2  
China35   7 4
Japan7 638 8 
Germany 355    
England 5 646 5
France4 2     
Italy 159   7
Spain35   7  
Australia9 738 38
Total Sales3131363528221927

  Thanks

Srini

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @ksrini ,

I created a sample pbix file(see attachment), please check whether that is what you want.

yingyinr_0-1619427295786.png

Best Regards

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @ksrini ,

I created a sample pbix file(see attachment), please check whether that is what you want.

yingyinr_0-1619427295786.png

Best Regards

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.