Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Repeat Item labels in fields

reshuagrawal
6 - Meteoroid

Hi All,

 

I have data in below order

 

Cust1  USA

Cust2  India

Cust3  China

 

I want my data in this form

Cust1 USA

Cust1 India

Cust1 China

Cust 2 USA

Cust2 India

Cust2 China

....

Can someone please help me with this, Thanks alot

4 REPLIES 4
charlie_archer
7 - Meteor

Hi there,

 

If they're seperate fields you can add two select tools after the input to split the workflow into two.

 

Take through only the cust field in the first select tool, and only the country field in the second select, then use the append fields tool to bring the two back together.

 

If they are the same field then use the text-to-columns tool first (delimiter as space), follow the above, and then use a formula tool to concatenate them back again after the append fields.

 

Thanks

Charlie

jdunkerley79
ACE Emeritus
ACE Emeritus

Assuming in the same data source, I'd use the append fields tool to create a cartesian join.

 

Something like:

2016-06-17_09-54-59.jpg

charlie_archer
7 - Meteor

Yep - that would be an easier way of doing it... :)

reshuagrawal
6 - Meteoroid

Thanks a lot ...its done

Labels