Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

How to transpose/Group data columns and row into reporting table

SSali
5 - Atom

Hi all,


Apologies for the ambiguous title, however I was not sure how to best describe the issue I am trying to resolve.

 

Currently I have a table which has a number of ID's with attributes associated and they are replicated for multiple timestamps.

 

I have created a formula tool to perform some data validation on each attribute (i.e. attribute needs to be between 0 and 1 etc.) and the results are then in the validation rule columns.

I now have the structure of output that is attached to this post:

 

COB_DATEVR_COB_DATEVR_IDVR_O_RatingVR_ODVR_G_RatingVR_SegmentVR_EntityVR_CLAVR_GLA
3/31/2018PassPassFailFailPassPassPassFailPass
12/31/2017FailPassFailPassPassFailPassPassPass
12/31/2017PassPassFailPassFailPassPassPassFail
3/31/2018PassPassFailPassPassPassPassFailPass

 

What I am trying to get to is the following structure:

COB_DATERuleFailPass
12/31/2017VR_COB_DATE18359
3/31/2018VR_COB_DATE13297
12/31/2017VR_ID5372
3/31/2018VR_ID5305
12/31/2017VR_O_Rating0377
3/31/2018VR_O_Rating0310
12/31/2017VR_OD0377
3/31/2018VR_OD0310
12/31/2017VR_G_Rating124253
3/31/2018VR_G_Rating103207

 

The way i did it initially led to an insane amount of summarize, arrange and cross tab steps (1 of each for every rule) and some of the files i am validating may have up to 20 rules which is messy.

 

There must be a way to have a single flow of steps to transpose and group the data like above without doing it rule by rule?

 

Thank you in advance for anyone that can help, I am still very new to Alteryx but see a lot of power in it so hoping to make it work.

 

I have attached and example of the input data for your reference.

3 REPLIES 3
BenMoss
ACE Emeritus
ACE Emeritus
Transpose your data with your date field as the key field and everything else as a data field.

Then perform a summarize, grouping by your date, name and Value field, then adding a count of the value field too.

Finally cross-tab your data. The date and name field will be your group by fields. The header field will be your name column and the data field will be the count column.

I did this mobile with no view of the data you attached but based on the sample data in your post this should work.

Ben
jarrod
ACE Emeritus
ACE Emeritus

You actually almost answer your own question. :) First you'll transpose then you'll cross tab. See my example for a better explanation (3 tools to transform the data)

SSali
5 - Atom

Ben, you are an absolute rockstar!!

I am still learning how to use all the little gadgets in Alteryx but this worked a treat :)

 

Thank you so much.

Labels