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 dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Is it possible to explicitly create a calculated column using a dax expression to order a column based on values of another column?
I have a a slicer wich has to follow the sorting I have set in PowerQuery but somehow it doesn't work in my front end since it shows the values in the filter ordered alphabetically:
I'd like the slicer to follow this order:
Index | Field |
1 | Germany |
2 | Austria |
3 | Italy |
4 | New Zeland |
5 | France |
I also cannot use Sort Column in the data field because it returns an error of too many values for that specific row.
I tried many times to clear the chace, remove the enable load of the table, and so on.. But the front end refues to reflect what is shown in my PowerQuery
So I'm looking for some sort of ORDER BY but that can be used in a calculated column.
Any ideas? thank you for your help
Solved! Go to Solution.
@MCacc I created a DAX Index once. The Mythical DAX Index - Microsoft Fabric Community
@MCacc You should be able to create a sort by column in Power Query and use that as your Sort By column, something like:
if [Country] = "Germany" then 1 else if [Country] = "Austria" then 2 else if [Country] = "Italy" then 3 else if [Country] = "New Zealand" then 4 else 5
Not sure why you are having issues with your current Sort By unless you have multiple different countries that match the same sort by value.
Thank you for your messege, but do you have any dax to make it dynamic since I won't have fixed values for my filter?
Thanks!
@MCacc I created a DAX Index once. The Mythical DAX Index - Microsoft Fabric Community
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
71 | |
70 | |
38 | |
28 | |
26 |
User | Count |
---|---|
98 | |
96 | |
59 | |
44 | |
40 |