Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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
User | Count |
---|---|
98 | |
76 | |
69 | |
53 | |
27 |