Forum Discussion
Reordering Table Columns in DAX/ Outside of Query Manager
- 8 years ago
To get the table as requested, we can use SELECTCOLUMNS Function (DAX) to reorder columns. For example:
Table = UNION(SELECTCOLUMNS(State1, Name1, Field1, Name2 , Field2…), SELECTCOLUMNS(State2, Name1, Field1, Name2, Field2…)…)
To get the table as requested, we can use SELECTCOLUMNS Function (DAX) to reorder columns. For example:
Table = UNION(SELECTCOLUMNS(State1, Name1, Field1, Name2 , Field2…), SELECTCOLUMNS(State2, Name1, Field1, Name2, Field2…)…)
This is not a solution. It is at best a workaround. The solution is some kind of drag and drop feature, perhaps leveraging this function, but, it should be under the hood. I and I suspect everyone who's come across this surprising limitation in Power BI model layer, want to drag and drop. Maybe it's a trickier programmng challenge that it seems, but, this is Miscrosoft, they should have fixed something this basic and important by now. Having columns in an order that makes sense to the modeller is very helpful and having to repeatedly breakoff to write a new SELECTCOLUMNS to put them in a better order isn't satisfactory.
I've just tried it out, it works but not in a way that helps. Yes you can return a table with all the columns re-arrranged in any order you like. But, to edit formulae you still have to go back to the original table. Basically it's not much use as a solution for the working modeller who wants to put columns as they are working with editable formulae into an order that assists thinking and makes sense to them. This non-solution does not do that. Please tell me I've missed something and it does, I'd be very happy.