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

one column blank number and text. i need shift number and text to new columns

hi experts,

i am still learning and I am a newbie. please help to support me on how can we do this.

i have data in one column 1 with values blank, number and text. I need to shift the number to column 2 and text to column 3. please advise on how can I do this in Power Query Editor.

 

thank you for your support.

 

1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

@Anonymous 

Or you may create a conditional column.

1. Duplicate the column

2. Change the copied column data type to numbers

3. Replace Errors to null

4. Create a conditional column

 

conditional column.JPG

 

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
V-pazhen-msft
Community Support
Community Support

@Anonymous 

Or you may create a conditional column.

1. Duplicate the column

2. Change the copied column data type to numbers

3. Replace Errors to null

4. Create a conditional column

 

conditional column.JPG

 

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

HotChilli
Super User
Super User

 

You could duplicate the column (call it DupColumn) then change the type of the new column to Whole number.  This will throw an error on the values that are text.  We can use this info to create 2 new columns. 

Using 'Add Column'->Custom column     from the menu.

1st New Column (the numbers) :

try [DupColumn] otherwise null

2nd New Column (the text):

let x = try [DupColumn]
in
    if x[HasError] then [Column1] else ""

Column1 is the name of your original column, just edit that part.

 

------

From there you can tidy up the datatypes, blanks and nulls to get the data in a form you want.

Good luck

 

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.

Top Solution Authors
Top Kudoed Authors