cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tiger007
Frequent Visitor

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

@Tiger007 

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

@Tiger007 

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

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power BI October Update 2021.jpg

Power BI Release

Click here to read more about the October 2021 Release!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Teds Dev Camp Oct. 2021 768x460.jpg

Power BI Dev Camp - October 28th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors