Calling all Alteryx customers: Refer your colleague to try Alteryx and receive a $50 gift card. Sign up now!

Alteryx Designer Desktop Discussions

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

Sort Columns of Cross Tab Output

jdallen75
7 - Meteor

Maybe I missed this in the configuration somewhere, but is there a way to sort the column headers (alphabetically) resulting from the Cross Tab tool?

 

Upstream of the Cross Tab, I tried sorting the rows that would become the Cross Tab column headers (ie: Item Type), but this didn't help.

 

Thanks!

10 REPLIES 10
MilindG
12 - Quasar

@jdallen75 Perhaps you can use Select tool to reorder your columns?

jdallen75
7 - Meteor

I thought of that, but the list of columns is not available at design time - only dynamically at run-time due to how the Cross Tab functions.

alexnajm
18 - Pollux
18 - Pollux

The Cross-Tab tool will automatically reorder columns in alphabetical order!

PangHC
12 - Quasar

@jdallen75 
you can create an order column and add them to the font of column name.

then use rename tool to remove the prefix name.

Screenshot 2023-08-02 101305.png

Screenshot 2023-08-02 101317.png

Screenshot 2023-08-02 101325.png

 

 

 

flying008
15 - Aurora

@PangHC 

 

Just so so ! 👍

PangHC
12 - Quasar

@flying008 @alexnajm 

 

i just have a similar situation. can you try on the workflow i attached?

 

@jdallen75can you try the sort for only item type? it works for me.

Screenshot 2023-08-08 103751.png

flying008
15 - Aurora

Hi, @PangHC 

 

What are you want output ?  The random input only get random output , cross-tab tool can't order it. 

PangHC
12 - Quasar

@flying008 it an example that crosstab is not automatically reorder columns in alphabetical order.

I wonder why this happen

beside, it still not sort accordingly even i turn off AMP.

 

 

flying008
15 - Aurora

Hi, @PangHC 

 

1- In fact , the Cross-Tab tool will automatically reorder columns in alphabetical order, whatever use AMP.

2- In your case, because the 'Random % Sample' macro use a rand() function to process data, then output  uncertain result at each run. unless you use a fix tool to sort it . 

3- I repeat your work in v2021.2.x, get same result like disarray fields between output-1 and output-2. so maybe this is a bug of version?

 

录制_2023_08_08_14_02_13_842.gif

Labels
Top Solution Authors