Sort Columns of Cross Tab Output
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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!
Solved! Go to Solution.
- Labels:
- Developer Tools
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@jdallen75 Perhaps you can use Select tool to reorder your columns?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
The Cross-Tab tool will automatically reorder columns in alphabetical order!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi, @PangHC
What are you want output ? The random input only get random output , cross-tab tool can't order it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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?
