Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Offset data columns using data from another field

creddy
6 - Meteoroid

I'm trying to offset the data in the period columns base on the number of periods in the Transit Time column.

For example in the first row below, Period 1 would be 0 and a new Period 16 column needs to be created so that the data is shifted by 1 column

and  in the second row, Period 1 & 2 would be 0 and new Period 16 and 17 columns need to be created so that the data is shifted by 2 columns.

 

offset.PNG

 

 

Any help with this would be greatly appreciated.

Thanks in advance

2 REPLIES 2
danrh
13 - Pulsar

Try this out:

image.png

By using Transpose first, you can change the column names instead of trying to change where the data is.  Then when you Cross Tab back to the original format, it shifts the data over the number of columns called out in your Transit Time column.

 

Hope it helps!

creddy
6 - Meteoroid

Didnt think of it this way.

This is so much simpler than what I was thinking( to Transpose and use the Multi Row formula)

Thanks a lot.

Labels
Top Solution Authors