Forum Discussion
Manually moving rows in a table
- Anonymous6 years ago
waiting foe MS to develop what you nedde, give a try to this function:
let moveRow = (tab,row, posToMove)=> let Pos=Table.PositionOf(tab,row), fromPos=Table.RemoveMatchingRows(tab,{row}), toPos=Table.InsertRows(fromPos,Pos+posToMove,{row}) in toPos in moveRowif you have a table like this and want to move row [col1=22,col2=bb] two position down
you can call the function and get this
if you want to move row [col1=33,col2=cc] two positio up (use a negative relative position)
it is possible using this scheme to add also the management of moving whatever row from pos Pi to position Pf
Hi all, many thanks for all your suggestions. As I have fairly basic knowledge of Power BI the easiest option is to include an additional index card which I can use to sort in the required order. It's not the most efficient option but probably one I can understand and gets me to where I need to be.
Thanks again!
Steve
Sometimes sfung you should absolutely do what you understand best as it will make your life easier down the road as you have to modify it.
If you could, give kudos (the thumbs up) to anyone who assisted in this thread, and mark your solution as the final answer so this thread can marked as solved.
Please post back with any further questions on this or any other project!