Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
- Question: How to sort all values in matrix using DAX? Goal: pick N highest / lowest values with relevant dimensions.
- Description: Matrix Trenddev has 2 dimensions: year (number) and location (number). The values (%) in the matrix represent the deviation between: (1) the actual value (measure, based on the actual value for that specific location and year), and (2) the calculated value based on the linear trend (measure using the actual data for the analysis period).
- Analysis period (start and end year): variable thru a slicer, max 18 years.
- Number of locations: max 3.000.
- Goal: get the N values (N = e.g. 5 or 10) with the highest (positive) / lowest (negative) values. In other words: where has the largest deviation occurred and when? For the outcome I need the value + location and year in order to be able to do further research into the how and why.
- Example: the attached Excel example is simplified for illustration and reference.
Your help is highly appreciated.
Thnx for your reply.
Unfortunately I'm afraid I don't follow you in your first step.
Can you show what you mean with your first step?
If you have help for creating that measure that would be nice too.
Thanks.
try these two steps
1, put both Locations and Year fields in the row
2, create a measure with RANKX to filter the visual
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
8 | |
7 | |
6 |
User | Count |
---|---|
14 | |
13 | |
11 | |
9 | |
8 |