The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi Everyone,
I need to shift one row up in a particular column of a table.
The rest of the columns should not be affected
Example: 2nd row moves to first, 3rd row moves to 2nd, 4th row moves to 3rd and so on. And then, the last value in the column should become 'blank' or 'null'.
Solved! Go to Solution.
Hi @Anonymous
I make a simple test.
Assume you want to move a row up for Column2,
Steps as below:
1) Create a duplicate Query ->Table1(2)
2) Remove the column(Column2) in original Query(Table1)
3) Remove the other 4 Columns in Duplicate Query(Table1(2)), only keep "Column2" in this table
4) Promote the relevant rows as headers in Table1(2) (Transform->use the first rows as headers)
5) Add an Index Column in both Queries
6) Now merge both queries using full outer join
finally, the result is as below
Then you could rename the columns or remove columns/table you don't need, finally select "close&&apply" and return to the "Data view".
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
I make a simple test.
Assume you want to move a row up for Column2,
Steps as below:
1) Create a duplicate Query ->Table1(2)
2) Remove the column(Column2) in original Query(Table1)
3) Remove the other 4 Columns in Duplicate Query(Table1(2)), only keep "Column2" in this table
4) Promote the relevant rows as headers in Table1(2) (Transform->use the first rows as headers)
5) Add an Index Column in both Queries
6) Now merge both queries using full outer join
finally, the result is as below
Then you could rename the columns or remove columns/table you don't need, finally select "close&&apply" and return to the "Data view".
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.