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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.