Alteryx Designer Desktop Discussions

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

Sorting order while transposing the data.

Alteryxexpert
8 - Asteroid

I Have the below data,

 

BusinessDateValue
ITJan-241223
ITJan-25156
ITJan-263123
ITFeb-24656
ITFeb-251313
ITFeb-2666
ITMar-241646
ITMar-253323232
ITMar-2641644
ITApr-2456526
ITApr-252263
ITApr-261236232

 

Data Available for all the 12 months.

 

When I'm Transposing it this is becoming like below,

BusinessApr_24Apr_25Apr_26Aug_24Aug_25Aug_26Feb_24Feb_25Feb_26Jan_24Jan_25Jan_26
IT12236561646        

 

 

But i Want the output as below.

 

BusinessJan-24Feb-24Mar-24Apr-24Jan-25Feb-25Mar-25Apr-25Jan-26Feb-26Mar-26Apr-26
IT1223656164656526122365616465652612236561646

565

 

How to Achieve this?

9 REPLIES 9
griffinwelsh
12 - Quasar

Update: I missed the part about the sort order. You can assign a record id and then use a dynamic rename to get the desired sort order. See the attached workflow

 

 

 

Alteryxexpert
8 - Asteroid

I'm Using Crosstab only, the output of the crosstab is coming like this,

BusinessApr_24Apr_25Apr_26Feb_24Feb_25Feb_26Jan_24Jan_25Jan_26Mar_24Mar_25Mar_26
IT5652622631236232656131366122315631231646332323241644

 

Whereas it should be Jan-24,Feb-24,Mar-24,Jan-25,Feb-25,Mar-25,Jan-26,Feb-26,Mar-26

alexnajm
17 - Castor
17 - Castor

Because the Crosstab puts it in alphabetical order, you'll need to use a Formula tool to add something to the header column so it sorts correctly! Workflow attached:

griffinwelsh
12 - Quasar

Sorry I missed the sort requirement. Recommend using Alex's solution

Alteryxexpert
8 - Asteroid

Adding something to the header will the change the Structure of the report. Is there any other way?

alexnajm
17 - Castor
17 - Castor

I am not sure I agree with that @Alteryxexpert - it is temporarily added to aid you and the Crosstab tool to order correctly, then removed with the Dynamic Rename to its original format.

binuacs
21 - Polaris

@Alteryxexpert one way of doing this

image.png

Alteryxexpert
8 - Asteroid

@binuacs Is there a way to populate total under each column? Which should be dynamic if new months are added in future. 

 

A Summarize won't pick the new data when used

binuacs
21 - Polaris

@Alteryxexpert use the row total option in the cross tab tool

image.png

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels