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:
Month | ID | Day |
January | 234 | 3 |
January | 268 | 2 |
January | 234 | 2 |
January | 987 | 1 |
January | 987 | 3 |
February | 987 | 1 |
February | 268 | 3 |
February | 234 | 3 |
March | 987 | 2 |
March | 268 | 2 |
March | 268 | 1 |
March | 234 | 2 |
I want it to look like:
ID | January | February | March |
234 | 3 | 3 | 2 |
987 | 3 | 1 | 2 |
268 | 2 | 3 | 2 |
Where the values in each month column are the MAX day values for each ID
Appreciate if anyone could help please?
Solved! Go to Solution.
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!
Thank you!
User | Count |
---|---|
19 | |
15 | |
15 | |
9 | |
8 |