Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I have the following slicer sorting challenge. Everytime I change the year from 1990, 2000, 2010, 2020, the city/location names on the y-axis auto sort... I dont want that to happen. I want them all to stay in the same order as they are currently in 1990. How can I do that? Step by step please 🙂
Solved! Go to Solution.
This solution is generalizable to many different situations where you want to force visuals to sort a certain way that cannot be done by Power BI because it is not alphabetical or increasing numerically etc. I do it all the time.
Create a new table with two columns.
Column1: City Name (contains all the cities, spelled exactly the same as they are spelled in your fact table)
Column 2: Sort Order (Numerical values corresponding to the order you want them in the visual)
Then, open up this new table in Table View, click City Name, and sort by column "Sort Order"
Open "Model View", and create an active many to one relationship between the City Name column in this new table and the City Name column in your fact table.
Use the City Name column from your newly created Dimension table in your visual.
Then fiddle with the "sort by" settings at the visual level until you get it how you want it.
///Mediocre Power BI Advice, but it's free///
This solution is generalizable to many different situations where you want to force visuals to sort a certain way that cannot be done by Power BI because it is not alphabetical or increasing numerically etc. I do it all the time.
Create a new table with two columns.
Column1: City Name (contains all the cities, spelled exactly the same as they are spelled in your fact table)
Column 2: Sort Order (Numerical values corresponding to the order you want them in the visual)
Then, open up this new table in Table View, click City Name, and sort by column "Sort Order"
Open "Model View", and create an active many to one relationship between the City Name column in this new table and the City Name column in your fact table.
Use the City Name column from your newly created Dimension table in your visual.
Then fiddle with the "sort by" settings at the visual level until you get it how you want it.
///Mediocre Power BI Advice, but it's free///
User | Count |
---|---|
86 | |
82 | |
68 | |
64 | |
55 |
User | Count |
---|---|
123 | |
100 | |
90 | |
83 | |
66 |