Hey guys,

What is the best approach to alternating a set down a bigger set? Also, this seems a bit too public, is there a private option for this help?

Hey Evan!

A good way to deal with the privacy issue is to just use a dummy data set that has the same structure as your data.

Letâ€™s say you have table 1, and it has rows 1,2,3 and 4. And you have table 2, which has a row for Brian and a row for Evan.

**Table 1**

`1`

`2`

`3`

`4`

**Table 2**

`Brian`

`Evan`

If I am understanding your question, then you want to generate a table like this:

**Result**

`Brian -- 1`

`Evan --- 1`

`Brian -- 2`

`Evan --- 2`

`Brian -- 3`

`Evan --- 3`

`Brian -- 4`

`Evan --- 4`

Is that correct?

Thanks for the reply.

table 1 and 2 are accurate.

Result tho needs to be.

Brian 1

Evan 2

Brian 3

Evan 4

etcâ€¦ for all

Ah okay! So even and odd.

In your table with the two names, add a new column using an If Else that sets one name/row to `1`

and `0`

.

In the other table, you will use two steps to â€śtagâ€ť each row as either a `1`

or a `0`

.

You can paste those steps from this snippet: parabola:cb:6aa08e179069497a91f022595988fbe5

Just paste that onto a blank portion of your canvas.

The first step is a Row Numbers step, and the second is a math step using this formula: `{Row Number}%2`

which will return 0 and 1 alternating.

Now, you can use a Join step to attach your names to your data!

the number of users can increase.

so in 1 case

Evan 1

Brian 2

Evan 3

Brian 4

Evan 1

Burair 2

Brian 3

Evan 4

Okay here is the generic version!

parabola:cb:adb2f9a0bf8a430bb6523d2770de5956

Pop that down into your flow. It looks like this:

The table of names is in the bottom CSV and the data you want to add the names to is in the top CSV.

The general outline is:

- Find out how many names there are
- Join that number to every row in the main data set
- Use the same modulo operation (with some added stuff) to create a pattern of values
- Add those values to the name dat with a Row Number steps
- Join the data to create the final table.

The crux of this flow is in the Math step:

This was beautiful and worked like a charm. Thank you Brian!