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

Moving certain rows in a column

Hi we received a huge text file from a user under which all columns where combined into one column. We are able to split them into 26 columns using the delimiter option.

But now I have the following situation. 

 

Column1 Column2  Column 3 Column 4 Column 5 

A               B              C              null          null 

D               E              F               null          null

G               0              0               H             I

 

We want to shift columns left for the rows where ever it is zero so that its aligned and then finally delete column 25 & 26.

 

Please let me know if you need additional context

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Alternatively created 6 custom columns to replace values with appropriate column values and finally hiding the erroneous columns did the trick, Not elegant but works for now.

View solution in original post

3 REPLIES 3
jdbuchanan71
Super User
Super User

Hello @Anonymous 

 

I'm assuming your text file looked something like this.

 

A,B,C
D,E,F
G,0,0,H,I

 

Could you safely remove each instance of "0," in the string before you split it (replace "0," with null)?  Then your split would align correctly.

Anonymous
Not applicable

We already had a redundant text which I replaced with 0

Anonymous
Not applicable

Alternatively created 6 custom columns to replace values with appropriate column values and finally hiding the erroneous columns did the trick, Not elegant but works for now.

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.