Join the Alteryx Community’s Maveryx Summer Cup event! Compete, network with others, and earn your gold through a series of challenges from July 24th to August 11th. Learn more about the event here.

Alteryx Designer Desktop Discussions

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

Ideas for a counting combinations in a cross tab

mattlukoff
8 - Asteroid

Hello, can someone direct me towards a solution for counting the number of combinations in this kind of data?  Expected output would be that 2 customers ordered Shoes and Pants, 1 customer odered Pants, Jeans and Shirts, etc. 

 

Customer IDShoesPantsJeansShirts
32111  
12311  
456 111
78911  
101112   1
678 1 1
5431   
0211   
555111 

 

Sample data attached.

 

Thanks,

3 REPLIES 3
DataBlender
11 - Bolide

Hi @mattlukoff, how about something like the attached?

 

It transposes, filters out nulls, sorts, before cross-tabbing and counting the occurrences.

JoeM
Alteryx Alumni (Retired)

What a fun question! Attached is my approach:

1) Pivot the data so it may be concatenated

2) Did a data cleanse to clean up the whitespace in the table (due to how I copied it into my workflow)

3) Found a named combo for each CustID by concat'ing the named of the purchased items together

4) Counted the combos in the dataset

marapatricia
7 - Meteor

Using the table you have above, attached is another approach using the concatenate functionality for strings in the Summarize Tool.

 

alteryx.JPG

 

 

Labels