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 sfung ,
You could use power query to delete row, if possible could you please inform me more detailed information(such as your expected output, your sample data and your logic )? Then I will try to test this in my environment.
Please do mask sensitive data before uploading.
Thanks for your understanding and support.
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.