Alteryx Designer Desktop Discussions

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

Cross Tab for 2 conditions

krishnagandhi
8 - Asteroid

Hi, I am trying to utilize the cross tab tool to make a pivot, i know it is possible but i am not able the reproduce the following:

This is the data i have

WorkDateEmp# Location
1/1/2020300122Onsite
1/1/2020300122Offsite
1/1/2020300320Onsite
1/1/2020300320Other
1/2/2020300122Onsite
1/2/2020300122Camp
1/2/2020300320Onsite
1/2/2020300320Offsite
1/2/2020300122Onsite
1/2/2020300122Other
1/3/2020300320Onsite
1/3/2020300320Camp
1/3/2020300122Onsite
1/3/2020300122Offsite
1/3/2020300320Onsite
1/3/2020300320Other
 

This is the output i want in alteryx

2020-05-15_11-14-49.gif

 
 
 
 

Thanks,

 

Krishna

 
4 REPLIES 4
RolandSchubert
16 - Nebula
16 - Nebula

Hi @krishnagandhi ,

 

you could add a value column and then use the Crosstab tool. I've attached a sample workflow.

 

Let me know if it works for you.

 

Best,

 

Roland

Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @krishnagandhi,

 

I think this is what you're trying to achieve?

 

Jonathan-Sherman_0-1589564355187.png

 

You can select Sum and Total Column (tick both) in your "Method for Aggregating Values" to get your count and Total Column in the crosstab tool:

Jonathan-Sherman_1-1589564533663.png

 

 

Jonathan-Sherman_2-1589564545908.png

 

 

 

If this solves your issue please mark the answer as correct, if not let me know! I've attached my workflow for you to download if needed.

 

Regards,

Jonathan

Jonathan-Sherman
15 - Aurora
15 - Aurora

Looks as though both @RolandSchubert and I came to exactly the same conclusion!

RolandSchubert
16 - Nebula
16 - Nebula

@Jonathan-Sherman , I think your solution is a bit more complete, I didn't mention the "Total Column". 

Labels
Top Solution Authors