Alteryx Designer Desktop Discussions

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

Pivot Table

walkrebe
6 - Meteoroid

Hi all

I’m trying to create a pivot style table in alteryx but can’t seem to figure it out. An example of my data is shown below:

MonthIDDay
January2343
January2682
January2342
January9871
January9873
February9871
February2683
February2343
March9872
March2682
March2681
March2342

 

I want it to look like:

IDJanuaryFebruaryMarch
234332
987312
268232

 

 

Where the values in each month column are the MAX day values for each ID

 

Appreciate if anyone could help please?

4 REPLIES 4
Kenda
16 - Nebula
16 - Nebula

Hey @walkrebe 

 

The Cross Tab tool will help you out here!

 

First, you will want to sort your records as follows:

Month - Ascending

ID - Ascending

Day - Descending

 

Then, add a Cross Tab tool and select ID as the field to Group by, select Month as the Headers, and Day as the Values. Finally, you'll want to select First as the Method for Aggregating Values. Unfortunately there is no Max option here, and that is why we needed to sort the data first. 

 

Hope this helps!

 

Kenda_0-1604149735737.png

 

atcodedog05
22 - Nova
22 - Nova

Hi 

 

Here is a workflow for the task. It maintains the months sort order by using a header template.

Output:

atcodedog05_0-1604153579030.png

 

Workflow:

atcodedog05_1-1604153590332.png

 

Hope this helps 🙂


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

walkrebe
6 - Meteoroid

Thank you!

atcodedog05
22 - Nova
22 - Nova

Happy to help 🙂 @walkrebe 

 

Cheers and Happy Analyzing 😀

Labels