Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Dynamic Columns from Cross Tab - Join doesn't keep columns together

flipperdm
8 - Asteroid

Hello,

I've looked through the discussions and can't find a solution to this question.  I have table that adds new dates to a column as time passes. Each day I run a workflow that cross tabs this date column, converting the results into their own header.  The issue is that every few days, when new dates appear, they don't show up immediately next to the other columns that appeared in the previous workflow run.  Example:  I have 2 tables.  The first table is dynamic (new dates) while the second table is static.  When I set this up the first time and run the workflow, the dates from Nov 5th to Dec 12th appear together.  Then, 2 days later, I run the workflow and December 15th shows up in the date column.  That new date will then appear somewhere else in the results.

 

How do I ensure that my cross tabbed dates always stay together when joined with other tables further down the flow...especially when new dates appear?

 

 

StoreShip DateCases
1112/5/20185
1112/6/201810
1112/7/201830
1411/5/20185
1412/6/2018105
1412/10/201888
1512/1/2018107

 

StoreRegionCountry
111CA
142CA
153CA

 

Store12/5/201812/6/201812/7/201812/10/2018RegionCountry12/15/2018
11111 1CA 
1411  2CA1
15   23CA1

 

Capture4.JPG

 

 

4 REPLIES 4
danilang
19 - Altair
19 - Altair

Hi @flipperdm 

 

I'm sure that @ChrisTX's solution will work(with some tweeking) but there are a couple of options you can use that don't require python tools

 

1.  Join to your store table after you performed your crosstab.  This way the store data is always added after the data fields.  My workflow reads the data from an excel sheet. 

 

Flow.png

 

Here's the output from the first run

 

Before.png

 

Here's the output after I added anther record to the excel. Notice how the date fields are always before the store data.

 

After.png

 

2. Move the  *unknown fields in the Join configuration to before the store data fields.  This way any new fields show up first

 

Join.png

 

Dan

 

 

 

 

 

 

 

flipperdm
8 - Asteroid

This worked.  The final workflow had 4 more joins which I had to ensure that "dynamic" appeared right after the date fields.  I also had to make sure that the "left's" were always before the "right's"

 

Thanks!

flipperdm
8 - Asteroid

Did need to go to this level but thanks for providing the option :)

Labels