Alteryx Designer Desktop Discussions

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

how to add add a new column at the front of the table?

ASHccccc
6 - Meteoroid

ASHccccc_0-1654151635894.png

as the pic  above, Alteryx has summarized the received vol for me, but when I used the CrossTab tool to make the table horizon, it became:

ASHccccc_1-1654151722243.png

I cannot indicate it's the Received Vol per month, anybody can help that how to add the front column to indicate that first row is Month, and 2nd row is the vol?

5 REPLIES 5
IraWatt
17 - Castor
17 - Castor

Hey @ASHccccc,

Is this the table your looking for:

IraWatt_1-1654153153212.png

 

It has each month as a row. The group by data shown above indicates what the rows will be in the cross tab.

Any questions or issues please ask :)
HTH!
Ira

Kurohits
10 - Fireball

I hope this will help you what you are looking for. I have attached the workflow also for your reference. Kindly accept this as solution if this approach worked for you. 

 

Screen Shot.png

binuacs
20 - Arcturus

@ASHccccc Another way of doing this

binuacs_0-1654236313662.png

 

ASHccccc
6 - Meteoroid

Many thank @binuacs

sorry that one more question, I tried with your solutions, but  at CrossTab tool I found the I cannot locate the aggregation method correctly, which shown:

ASHccccc_0-1654567174433.png

 

so I tried to check back the Transpose tool, I found that the output Value at this section are different:

here is mine:

ASHccccc_1-1654567359653.png

and yours:

ASHccccc_2-1654567389533.png

is this the matter?

ddiesel
13 - Pulsar
13 - Pulsar

Hi @ASHccccc!

 

In @binuacs solution, the numbers are stored as numeric data type (as indicated by the 123). It appears that the values in your workflow are stored as strings (as indicated by ABC)

 

For string fields, you can only perform text based aggregations like concatenate, first, or last. To do any math, such as SUM, Average, etc., the data type must be changed to numeric.

 

You can accomplish this with the Select tool to change the data type before the Cross Tab tool. Tip: Make sure all the values in your real data are numbers first!

 

Check out section 4 of the help documentation for more information:

https://help.alteryx.com/2018.2/CrossTab.htm

 

Hope this helps!

 

Thanks,
Deb

 

 

Labels