Alteryx Designer Desktop Discussions

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

Excel Pivot Chart like output

EricO
5 - Atom

Is there any way to create a chart with multiple row/column group by functions like in Excel using the Interactive Chart tool.  I want to show year over year results of responses received to a survey by date. as in the chart below.

 

 

EricO_0-1608346340661.png

 

My Source data looks like this:

 

DateCount
1/1/201537
1/2/201528
1/3/201547
1/4/20154
11/30/20151
12/1/20151
12/13/20152
12/14/20157
12/15/20153
12/17/20152
12/18/20151
12/20/2015146
12/21/201552
7 REPLIES 7
AngelosPachis
16 - Nebula

Hi @EricO 

 

You can create that with the Interactive Chart tool, but you should do some data prep first. Use a formula tool to bring your date in a format that Alteryx can understand as a date, and then parse out the Year and the Month-day info.

 

The former will be used to colour your different lines and the latter as you x-axis.

 

AngelosPachis_1-1608368812420.png

 

Then in your interactive chart tool, plot the line chart as shown below :

 

AngelosPachis_2-1608368929671.png

 

and under the transforms tab, select to split by year

 

AngelosPachis_3-1608368969750.png

 

 

Then you should end up with something looking like that:

 

AngelosPachis_0-1608368777454.png

 

Hope that helps, let me know if you have any questions.

 

Regards,

 

Angelos

 

EricO
5 - Atom

Hi Angelos,

 

Thanks for your help.  Your input has gotten me 90% of the way there.  One small issue I am having though, is that my data for each series crosses the December/January boundary, and the Interactive chart tool can't figure out how to sort the x-axis. I played with presorting the data by using an artificial julian date were days < 100 get 366 added to them which fixed the individual plots, 

 

When only one series is graphed, it works fine

 

EricO_0-1608401101015.png

 

When more than one series is plotted however, the data starts to get scrambled.

 

EricO_1-1608401228312.png

 

Note the out-of-order Jan,Nov, Dec data points for the 2015 dataset in the graph above.  Any idea on how to deal with this?

AngelosPachis
16 - Nebula

Hi @EricO ,

 

So out of curiosity, the January shown in your graph coming after December, is it still 2015 or is it 2016? 

EricO
5 - Atom

The date is really in 2016, but is part of the 2015 campaign, so 2015 is really the series name.

AngelosPachis
16 - Nebula

Hi @EricO ,

 

I've made some small changes and amended the year in the date fields (so Jan in the 2016 campaign would be 2017).

 

Then, I've created a new field/flag called "campaign", which I've used to split and colour the different lines. 

 

Then it was just a matter of parsing the date and sorting the fields as needed.

 

AngelosPachis_0-1608417966510.png

 

Hope that helps, let me know if it worked for you.

 

Regards,

 

Angelos

EricO
5 - Atom

Hi Angelos,

 

Thanks for your help.  This was more complicated than just sorting the data properly.  The underlying issue was that each "Campaign" or series as they are called in Excel needed to have all the same Range values (Date) present in order for the chart tool not to go crazy. In your examples, you used data points on all the same day-of-month, even if you skipped some days.  However, in my actual data, not every series had the same calendar days.  For example in 2015 there might have been a Nov 15, but in 2016-2020, there might not have been.  Once I created a Cartesian table of dates, so that every series has the same number of range values, the chart sorted itself out.  There is probably an easier way to do this, but it was what I came up with base on my limited experience with the tool.  Thanks again for the help.

 

EricO_0-1608584870684.png

 vs. 

 

EricO_1-1608585032733.png

 

AngelosPachis
16 - Nebula

Hi @EricO ,

 

Apologies for that, I did all I could with the data and knowledge of the problem you provided.

 

Glad you manage to sort it out on your own.

Labels