Free Trial

Alteryx Designer Desktop Discussions

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

Sorting the columns based on the values

Arvindcodes
6 - Meteoroid

Dear Users, 

 

i am trying to use Cross tab tool in the below table 

 

IDfirst name Last nameTypeexpense typeAmount
1FN1LN1Officecar100
1FN1LN1Officebike50
1FN1LN1Officevan500
2FN2LN2Homecar1000
2FN2LN2Homebike100
1FN1LN1Officecar200

 

in order to get the output similar to 

IDfirst name Last nameTypesum_carsum_vansum_biketotal
2FN2LN2Home100001001100
1FN1LN1Office30050050850
   total1300500150

1950

 

But when i use the cross tab tool, it gives me new columns in the ascending order of the alphabets i.e a-z so i get Sum_bike, Sum_Car and sum_Van. 

 

Could you please help me get the column sorted in the order its total value ? 

 

Regards,

ASR

4 REPLIES 4
ShankerV
17 - Castor

Hi @Arvindcodes 

 

It is possible to achieve via multiple ways. 

 

One way is to use Select tool to rearrange the columns,

 

ShankerV_0-1670435432463.png

 

 

Many thanks

Shanker V

ShankerV
17 - Castor

.

PanPP
Alteryx Alumni (Retired)

Hi @Arvindcodes 

 

I have uploaded a sample WF to achieve your output.

 

Hope this helps, if it does please like this post and if it helps resolve your problem, mark it as a solution so other community members can see it. If you have any other questions, please let us know.

 

SmitaLohande
9 - Comet

Hi @Arvindcodes 

 

You can achieve desired output using the Summary and Cross Tab tool.

 

To get the Row Totals, I have further summarized and then Union'ed the results.

 

I have attached my solution to the response, tried to make it as simpler as I could :)

Please do have a look and let me know any queries.

 

Also please mark it as solution if it turns out to be useful and has helped to achieve your results :)

 

Good Luck !!

 

Many Thanks :)

Labels
Top Solution Authors