Forum Discussion
Change columns order in Matrix
- 6 years ago
It is going to depend on your data. But, if you have a table in which you have your values for your store identifiers, Store 1, Store 2, Store 3, etc., in Power Query createa a column that looks at those values and produces your sort order, let's say you want:
Store 2
Store 4
Store 3
Store 1
You would create a column, we will call this column "Sort", where if your Store column is Store 2, this column would be 1 and if the Store column is Store 4, 2 and so on.
Then, once you import this data, you would select your Store column. You would go to Column Tools and then Sort by column and choose your new Sort column.
Not sure I can explain the process any better than that.
It is going to depend on your data. But, if you have a table in which you have your values for your store identifiers, Store 1, Store 2, Store 3, etc., in Power Query createa a column that looks at those values and produces your sort order, let's say you want:
Store 2
Store 4
Store 3
Store 1
You would create a column, we will call this column "Sort", where if your Store column is Store 2, this column would be 1 and if the Store column is Store 4, 2 and so on.
Then, once you import this data, you would select your Store column. You would go to Column Tools and then Sort by column and choose your new Sort column.
Not sure I can explain the process any better than that.
Hi Greg_Deckler ,
Thank you so much for the reply! It worked.
Just one more question: I had the column which I sorted by the new Sort column, in a dax formula with ALLEXCEPT(that column), and now the formula is not working. Should I replace with the new Sort column in the formula instead of the old column? 😄