Forum Discussion
MCacc
Helper IV
2 years agoDax to order column based on another column
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...
- 2 years ago
MCacc I created a DAX Index once. The Mythical DAX Index - Microsoft Fabric Community
Greg_Deckler
Community Champion
2 years agoMCacc 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.
MCacc
Helper IV
2 years agoThank 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!
- Greg_Deckler2 years ago
Community Champion
MCacc I created a DAX Index once. The Mythical DAX Index - Microsoft Fabric Community