Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi Everyone,
I want to sort the data in a matrix in a specific order. When I select a value in the slicer,
Below is the raw data image :
The matrix contains Product and Value [Measure].
Raw Data
Slicer :
The order in which the products need to be sorted on the year value selected in the slicer.
Raw Data:
| Table | ||
| Product | Year | Value |
| P3 | 2023 | 100 |
| P2 | 2023 | 200 |
| P1 | 2023 | 300 |
| P8 | 2023 | 40 |
| P6 | 2023 | 100 |
| P1 | 2024 | 200 |
| P3 | 2024 | 300 |
| P2 | 2024 | 40 |
| P14 | 2024 | 100 |
| P12 | 2024 | 200 |
slicer
| slicer |
| Year |
| 2023 |
| 2024 |
Order needed
| Order Required [ when I select year in Slicer ] | |
| 2023 | 2024 |
| Order | order |
| P1 | P1 |
| P2 | P2 |
| P3 | P3 |
| P6 | P12 |
| P8 | P14 |
Solved! Go to Solution.
@Madhu7624 Ok, so create a custom column in Power Query with this code:
then load data and make Sort Product a Whole Number type:
Now click on Product column and choose this new one in "Sort by column"
@Madhu7624 Ok, so create a custom column in Power Query with this code:
then load data and make Sort Product a Whole Number type:
Now click on Product column and choose this new one in "Sort by column"
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 16 | |
| 8 | |
| 7 | |
| 7 |