Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Move one row up in a particular column

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'.

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

I make a simple test.

Assume you want to move a row up for Column2,

7.png

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

8.png

 

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.

View solution in original post

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

I make a simple test.

Assume you want to move a row up for Column2,

7.png

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

8.png

 

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.

Anonymous
Not applicable

Thanks @v-juanli-msft , It worked!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.