Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin 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.
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:
Country | QTY | Amount | Profit% | RANK_QTY | RANK_Amount | RANK_PROFIT |
A | 55 | 500 | 35% | 4 | 4 | 3 |
B | 20 | 700 | 45% | 6 | 1 | 1 |
C | 70 | 650 | 18% | 2 | 2 | 6 |
D | 70 | 600 | 40% | 2 | 3 | 2 |
E | 23 | 400 | 22% | 5 | 5 | 4 |
F | 81 | 200 | 20% | 1 | 6 | 5 |
Thanks Amit
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).
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!!
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
63 | |
59 | |
56 | |
38 | |
29 |
User | Count |
---|---|
82 | |
62 | |
45 | |
41 | |
40 |