cancel
Showing results for 
Search instead for 
Did you mean: 

moving rows up and down

SOLVED
TiffanyH12
Meteor

moving rows up and down

what I have currently:

 Q1Q2Q3Q4
Expense    
RSU    
Estimate    
PRSU    

 

I'd like for all the data in the table to remain, but shift the entire row so they are in this order:

 

 Q1Q2Q3Q4
RSU    
PRSU    
Expense    
Estimate    
5 REPLIES 5
TiffanyH12
Meteor

moving rows up and down

what I have currently:

 Q1Q2Q3Q4
Expense    
RSU    
Estimate    
PRSU    

 

I'd like for all the data in the table to remain, but shift the entire row so they are in this order:

 

 Q1Q2Q3Q4
RSU    
PRSU    
Expense    
Estimate    

Re: moving rows up and down

Hi @TiffanyH12,

 

Looking at the sample of data that you have given here, I can tell that you want the first field in the descending order. Try using the sort tool on the first field in descending order.

 

Attaching the screenshots for your reference.

input.png

 

sorting.png

I hope it helps.

Sapna Gupta
Highlighted
echuong1
Alteryx Alumni (Retired)

Re: moving rows up and down

Will your output always contain those four fields and should they always be put in that order?

 

If so, it's actually in reverse alphabetical order. In that case, you can actually use a Sort tool with the first field Descending.

 

Otherwise, you can assign record IDs in the correct order and sort based on that. You could create a reference list with the fields in the correct order and then do a join to add the record ID. After that, sort on the record ID.

 

echuong1_0-1594839065855.png

 

Attachment
Download this attachment

Re: moving rows up and down

I actually have more rows so sorting is not the best option! (probably should have clarified!) How would you implement the record ID/reference list you mentioned? 

What I have

RSU
ESPP
estimate
PRSU
Total Expense
Total RSU/PRSU
True Up

 

What I'm looking for:

RSU
PRSU
ESPP
Total Expense
Total RSU/PRSU
True up
Estimate

Re: moving rows up and down

Hi @TiffanyH12 ,

 

you can use a table containing row labels and order number. Add the order number to your data and use this number to sort. I've attached a sample workflow.

 

Let me know if it works for you.

 

Best,

 

Roland

Attachment
Download this attachment
echuong1
Alteryx Alumni (Retired)

Re: moving rows up and down

See attached. Essentially, I'd have a reference list in the order that I'm looking for going down vertically. From there, you can add a record ID and then join on the row value. After that, simply sort by the record ID.

 

echuong1_0-1594907798188.png

 

Hope this helps!

 

Attachment
Download this attachment