Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Pivot Table

JAB95
7 - Meteor

Hi Alteryx Community,

 

I'm looking to create a pivot table-equivalent using Alteryx. I can't quite figure it out.

 

I've attached a dummy example of my input and added a tab to show my expected output.

 

Any help would be greatly appreciated!

 

Best,

 

Jeremy

 

3 REPLIES 3
morr-co
10 - Fireball

Hi @JAB95 - the Transform tools are going to be your go to here. The Crosstab tool allows you to pivot data and summarize similar to a pivot table. From your input file, you could use the Summarize tool to do additional aggregation. For example, grouping by Record Type and summing or averaging the numeric fields, like SUM(1). 

afv2688
16 - Nebula
16 - Nebula

Hello @JAB95 ,

 

Would this work for you?:

 

Untitled.png

 

Regards

Kenda
16 - Nebula
16 - Nebula

Hey @JAB95 

 

I think the key to what you're looking for here is the cross tab tool. First, you can create two new fields, one that contains the year (which will become the headers) and one that is a group that contains your team code and category:

 

year:

DateTimeYear(datetimeparse([EFFECTIVE_DATE],"%m/%d/%Y"))

 

group:

[Team Code] + " - " + [Category]

 

Then just use a cross tab tool, group by the group field you created and make sure to select sum, total column, & total row in the method for aggregation:

Kenda_0-1618241321474.png

 

 

Hope this helps!

Labels