PDA

View Full Version : Label in same column as data



Spencer_2
2016-11-29, 08:15 PM
So i have imported this HTML file so PQ can clean, organize and calculate. However in the product ID, column is also where the download put the customer name.
How do I extract the customer names only so they can be put into a separate column?

Thanks for the help.

Ken Puls
2016-11-29, 08:38 PM
So the short answer (assuming the ProductID is numeric) is this:
-Duplicate the ProductID column
-Change the type on the new column to a numeric type
-Replace errors on the new column with null
-Add a conditional column called Customer that says: if [NewColumn] = null then [ProductID] else null
-Fill the Customer column down
-Filter NewColumn to remove null values
-Remove NewColumn

If you'd like to see an example with the working code, upload a 10 line sample that shows 2 customers and I can work through it for you.

Spencer_2
2016-11-29, 08:53 PM
Well just refreshed and customer name sits in product description column which is also text. BUT, each product description does begin with a number i.e. 6/12.

Spencer_2
2016-11-29, 09:01 PM
6077

Ken, let me know if this view fits your request above?

Ken Puls
2016-11-29, 09:10 PM
Okay, sure. So if you use the steps I supplied above but target everything at Column6, you'll get what you need. Happy to show you if you provide an Excel file with that data instead of a jpg. ;)

Spencer_2
2016-11-29, 09:53 PM
Well... with some additional copied columns this did WORK!!! Thanks so much Ken for the assistance. I'm sure I will need additional in the future. I'm buying your book ASAP so I know that will help a ton.

Cannot thank you enough. Spencer