Forum Discussion

raj5714's avatar
raj5714
Regular Visitor
1 year ago
Solved

Moving text data in next column

Hi Team,      In power query editor, how to move text data into next column as it seems the data for a particular row is not appering in the correct column.    Regads,   Niraj   
  • Elena_Kalina's avatar
    1 year ago

    Hi raj5714 

     

    When your data appears in the wrong columns, here are several methods to fix this in Power Query Editor:

    1. Split Columns by Delimiter (Best for Consistent Patterns)

    1. Select the column with misaligned data

    2. Go to Transform tab → Split Column  By Delimiter

    3. Choose the appropriate delimiter (comma, tab, space, etc.)

    4. Select At each occurrence or At left-most/right-most delimiter as needed

    5. Click OK and rename the new columns

    2. Extract Text to New Columns (For Position-Based Issues)

    1. Select the problem column

    2. Use Extract options in the Transform tab:

      • Text Before Delimiter

      • Text After Delimiter

      • Text Between Delimiters

      • First Characters/Last Characters (for fixed-width data)

    3. Use Replace Values to Fix Specific Cases

    1. Right-click the column → Replace Values

    2. Enter the text pattern that's appearing in the wrong column

    3. Replace with blank or the correct value

    4. Conditional Column for Complex Cases

    1. Go to Add Column  Conditional Column

    2. Set up rules like: "If ColumnA contains 'wrongtext' then ColumnB else ColumnA"

    5. Transpose Then Reorganize (For Severe Misalignment)

    1. Select Transform  Transpose

    2. Reorganize the data as needed

    3. Transpose back to original orientation

     

    If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

    Thank you.