Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Cross-tab every n number of rows

MB777
5 - Atom

My data is formatted like this: 

 

CategoryProductProduct-SegmentValue
AApple110
ABanana233
AOrange355
BApple112
BBanana244
BOrange366
CApple177
CBanana221
COrange363

 

I need to get it to look like this: 

 

ProductBusiness UnitABC
Apple1101277
Banana2334421
Orange3556663

 

I know I need to use Cross-Tab, but how do I get it so it pivots every 3 columns (all of the A's, all of the B's, all the the C's and makes an A, B, and C column)? In my data, it's consistent so that each category takes up 3 rows. I need to pivot these rows so they are columns instead. 


Any help is appreciated! Thanks so much!

1 REPLY 1
RolandSchubert
16 - Nebula
16 - Nebula

Hi @MB777 ,

 

in the Cross Tab tool, select "Product" and "Product-Category" as "Group by" fields, Category is header and Value is the field containing the values for columns, Method will be "SUM". I've attached a sample workflow.Hope this is helpful.

 

Best regards

 

Roland

Labels
Top Solution Authors