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.

Pivot table - Format Cross Tab

ZahinOsman
8 - Asteroid

Hi guys,

 

I have the following pivot tables (Cross tab tool) below, and I need to do some format amendments;

 

SumPivot.PNG

As highlighted, I am trying to switch January and February around. 

 

 

 

 

TradePivot.PNG

 

For the 2nd screenshot, I am trying to format the data/table into something like below;

  JanuaryFebruaryMarchTotal
Non - SG EntityNon-SG FO           9,054         7,365         9,393       25,812
Non - SG EntitySG FO       186,075     184,178     263,160     633,413
SG EntitySG FO              412            217            295            924

 

Is there something in the Reporting tool i can use?

 

Thanks!

7 REPLIES 7
Qiu
21 - Polaris
21 - Polaris

@ZahinOsman 
The Cross Tab tool will arrange the columns based on the Accending Order of the Column Names, so we need some Prefix to tract the order of the columns.
I usually do something as below.

0310-ZahinOsman.png

nicsintila
5 - Atom

You can use the Table Tool to format the table if you want to use the reporting tools. Simply re-arrange the columns on the per column configuration tab.

 

You may also do this using the select tool if the column arrangement is the only issue.

 

 Capture.PNG

aatalai
14 - Magnetar

@ZahinOsman you could also use the select tool after the crosstab, admit that can be a bit manual though

ZahinOsman
8 - Asteroid

Thanks all! let me try the suggestions

ZahinOsman
8 - Asteroid

How do I arrange it from Cross Tab results?

TradePivot.PNG

 

ultimately you are correct in your final output, this is what I want to achieve

 

SumPivot2.PNG

 

ZahinOsman
8 - Asteroid

@Qiu Hey I tried your method but realized the input you have is already in the desired format. Could you elaborate?

 

So in the below screenshot I have the following Cross Tab 

CrossTab.PNG

 

Table

Trade EntityFO LocationMonthFebruaryJanuaryJuneMarch
Non - SG EntityNon-SG FOFebruary7365   
Non - SG EntityNon-SG FOJanuary 9054  
Non - SG EntityNon-SG FOMarch   9393
Non - SG EntitySG FOFebruary184178   
Non - SG EntitySG FOJanuary 186076  
Non - SG EntitySG FOJune  1 
Non - SG EntitySG FOMarch   263160
SG EntitySG FOFebruary217   
SG EntitySG FOJanuary 412  
SG EntitySG FOMarch   295

 

 

It needs to look like the table below;

 

RecordIDTrade EntiryFO LocationJanuaryFebruaryMarchTotal
1Non - SG EntityNon-SG FO9,0547,3659,39325,812
2Non - SG EntitySG FO186,075184,178263,160633,413
3SG EntitySG FO412217295924

 

 

I am having trouble re arranging the Cross Tab table to attach prefix's. Any advise would be appreciated

Qiu
21 - Polaris
21 - Polaris

@ZahinOsman 0310-ZahinOsman-r1.png0310-ZahinOsman-r1-A.png
You are right.

So we can convert the String of Month to Month Numbers with DateTime function then we can have the correct order.

 

Labels