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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Amit_Saxena
Microsoft Employee
Microsoft Employee

How to align metrics in increasing order in table based on dimension selection

Hi
Need help in DAX, I have pbi Table with coutry Dimension and few metrics (3) and based on user country selection all metrcis availabe in table should be align in ascending order from left to right based on thier ranking,for example : if user selected Country 'F' then whichever metrics among these three has high rank should be placed in first column then 2 then 3, here is an example based on user selection as 'F' country, QTY metrics should be first placed followed by Amount then Profit%, and if user changes the selection ofcountry then this order should be chnaged based on counrty whihc user has selected and it's ranking, metrics should aling in horizontally in increasing order from leftt right, pls suggest how would i align the metrics in ascending order for these metrics based on country slection, How can i place the metrics in order?

 

Here is the sample data and PBI:

sample PBI 

 

CountryQTYAmountProfit%RANK_QTYRANK_AmountRANK_PROFIT
A5550035%443
B2070045%611
C7065018%226
D7060040%232
E2340022%554
F8120020%165

 

screen shot 

Thanks Amit

 

2 REPLIES 2
lbendlin
Super User
Super User

That is a rather tall ask. It's possible to do as long as you know how many measures are involved (for example when you always need to sort between three measures).

https://community.powerbi.com/t5/Community-Blog/Creating-a-custom-or-hybrid-matrix-in-PowerBI/ba-p/1...

 

But it would be MUCH easier to teach your users how to rearrange the visual content themselves, via the "Personalize Visual" feature.

 

Thanks lbendlin for you reply and sharing this link, but this is slightly different and i need to think of how i can add the logic to use rank  these measures based on the selection of filter. slightly complicated for me, let me try and solve the ranking problem then aling the best rank column first in order based on region selection.  Appreciate your response!!

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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