Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Force Sort Order with Dynamic Fields

Brost
6 - Meteoroid

I am looking for a solution on how to force sort a dynamic list of activities and have the Grand Total row always at the bottom.  I've searched through some of the other Community questions and responses on similar force sort topics and most seem to have a solution of creating an index column and then using the sort tool as a way to sort based on the indexed column.  I do not think I will be able to use this approach because the rows in the column I want sorted will be dynamic and change based on the customer the workflow is run for.  For example, customer a could have a list of 5 activities and customer b could have a list of 10 activities.  In both cases, I want the Grand Total row to always be at the last row in the output.  I'm thinking that a multi-row formula tool might be needed, although I am not very familiar with how to be use this tool.  If anyone has an idea on how I can accomplish this, I would appreciate some ideas. 

 

Thank you!

 

 

 

3 REPLIES 3
binuacs
21 - Polaris

@Brost one way of doing this use a filter tool and filter out based on activity = “Grand Total”

 

then union the results from the both output of filter tool . Check the sort order option in the union tool make sure the the True record from the filter tool always be the last one 

 

binuacs_0-1652388794695.png

 

IraWatt
17 - Castor
17 - Castor

Hey @Brost,

This workflow ensures that a grand total is always appended

IraWatt_0-1652368191768.png

 

Ben_H
11 - Bolide

Hi @Brost,

 

Does it matter what orders the activities go in?

 

If not why can't you just do what you suggested above?

 

The example below just checks if the Activity column contains "Grand Total", if yes 1, if no 0 and sort on that.

Ben_H_0-1652368357130.png

Ben_H_1-1652368374695.png

Regards,

 

Ben

Labels
Top Solution Authors