Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I can sort the axis by year or by spend, is it possible to have them sort by the largest spend for the year 2016? (so Pharmaton first)
DAX formula possibly?
Any insight appreciated!
Solved! Go to Solution.
Hi @ronnoc,
Perhaps you can use "Line and clustered column chart" to sort by rank measure.
In addition, I test on clustered column chart but haven't found a way to sort by other fields.
Regards,
Xiaoxin Sheng
Yes, it's possible, not as easy as it should be. There are probably other ways to do this, but here's one approach to have them sort by "2016 Spend":
1. Create a "2016 Spend" measure
2016Spend:= CALCULATE([Spend], Calendar[Year] = 2016)
2. Create a "Brand Rank by 2016 Spend" measure
BrandRankby2016Spend:= RANKX( ALL(Brands[BrandName]), [2016Spend])
3. I'm actually not sure how to do the "Sort By" in Power BI but you can give it a whirl - you may have to create #2 as a Calculated Column
Here's where we cover RANKX: https://www.powerpivotpro.com/2015/06/rankx-apalooza-within-and-across-groups-with-filters-etc/
Have you tested the measure BrandRankby2016Spend?
Could be something wrong with my dataset but it just returns 1 on every row.
Thanks for your help so far.
@austinsense Thanks for your help! Unfortunately I cant order Brand by the new calculared column brandRankBy2016 because a column can not be sorted by another column that is already sorted by the first column hahaha.
PowerBI: the difficult stuff became easy, the easy stuff became impossible
Hi @ronnoc,
Perhaps you can use "Line and clustered column chart" to sort by rank measure.
In addition, I test on clustered column chart but haven't found a way to sort by other fields.
Regards,
Xiaoxin Sheng
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |