Alteryx Designer Desktop Discussions

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

Cross tab with more than one value field

MRoyW
8 - Asteroid

How can I make new column headers based on row information where the values are in two columns?

For example, the sample output required:

DateActual RevenueActual COGSBudget RevenueBudget COGS
1/12/122114 121200
1/01/100045352342
19/04/170064563045
16/01/192425133500

 

From the current file I have of the form:

DateTypeRevenueCOGS
1/12/12Actual21141212
1/01/10Budget45352342
19/04/17Budget64563045
16/01/19Actual24251335


The actual data would have both actual and budget performance for each date.

5 REPLIES 5
atcodedog05
22 - Nova
22 - Nova

Hi @MRoyW 

 

Here is a workflow for the task. I have added both actual and budget for first 2 dates.

 

Input:

atcodedog05_0-1603377780504.png


Output:

atcodedog05_1-1603377806801.png

 

Workflow:

atcodedog05_0-1603377682855.png

 

 

Hope this helps 🙂


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

mceleavey
17 - Castor
17 - Castor

Hi @MRoyW ,

 

I've attached a workflow for you.

This was achieved with a bit of Transpose and Crosstab magic.

mceleavey_0-1603377773492.png

 

 

M.



Bulien

CharlieS
17 - Castor
17 - Castor

Hi @MRoyW 

 

The way I would go about this is to Transpose the data first so you can use a formula expression to combine the [Type] values with the header names. Then use a Cross Tab with the new field names and that's most of it. I also added a Data Cleansing tool to replace nulls with 0s. Since your date values are not in chronological order, you could use a RecordID tool at the beginning so you can keep that original order of records. 

 

Check out the attached workflow to see an example of how this all can be done and let me know if you have any questions. Happy Alteryx-ing!

atcodedog05
22 - Nova
22 - Nova

Happy to help 🙂 @MRoyW 

 

Cheers and Happy Analyzing 😀

MRoyW
8 - Asteroid

Thanks guys

Labels