Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Dynamic sort descending by last month

neromerob
10 - Fireball

Hello to everyone. 

 

I´m working in a workflow that shows all the month in the database, something similar to this. 

 

sort_.JPG

 

Now, consider that the workflow is showing all the month except for today (June) 

 

but I need to sort the last month (descending) and it has to be dynamic, today the month is may, but next month will be June and so on. 

 

Thank you. 

 

 

 

 

 

 

11 REPLIES 11
CarliE
Alteryx Alumni (Retired)

Hi @neromerob 

 

Attached is a workflow!

 

What I did here is created a record ID to maintain the rows, then pivoted the data to create month numbers, after that i sorted in ascending order and pivoted it back!

CarliE_0-1654716094799.png

 

If this solution solved your problem, please mark it as a solution!

 

Thanks

Carli
IraWatt
17 - Castor
17 - Castor

Hey @neromerob,

Here is an simple dynamic workflow which can do this:

IraWatt_0-1654716249179.png

Any questions or issues please ask :)
HTH!
Ira

 

csmith11
11 - Bolide

Sorted on the last column in Descending order:

csmith11_0-1654716741229.png

 

binuacs
20 - Arcturus

@neromerob one way of doing this with the Dynamic Select tool

 

binuacs_0-1654756376466.png

 

ddiesel
13 - Pulsar
13 - Pulsar

Hi @neromerob!

 

Kindly let us know if any of these solution(s) worked for you.


Thanks,
Deb

neromerob
10 - Fireball

Sorry to everyone I was ill and couldn't test the solutions properly until today. 

 

I think i need another approach. 

 

you see, originally the date in the database is presented like this. (just and example)

 

date.jpg

 

This means that "DATE" is how originally the date is presented and "month" is how I extract the data to do later any transformations that i requiered ("Sep-2022"; "September-2022)

 

This means that any change that i must do to get until the previous month should be done before the formula. could be adding a new file or any other solution. any thoughts. 

 

Thank you. 

 

ddiesel
13 - Pulsar
13 - Pulsar

Hi @neromerob!

 

I think we might need more details. A sample of the input and desired output would help.

 

If your data looks like the screenshot above, will a filter on the DATE field work?

 

Capture.JPG

 

neromerob
10 - Fireball

Hello to everyone.

I´m adding a workflow that more or less show what I need.

 

workflow_date.jpg

 

 

In here you can see a database with 4 months (From March to June), June is the last moth but I need to show information until the previous month (from March to May) sort by the last month descending.

Keep in mind that month will change eventually and the information shown should reflect that change.

I add a normal sort tool just to show you how the information looks like this month.

 

Thank you again

CarliE
Alteryx Alumni (Retired)

@neromerob 

 

Hi there,

 

I attached a workbook. This is adding onto the process I sent earlier. I created a macro for this and fed in the latest month field in the macro to automatically update the sort.

 

If this solved your problem, please make sure to mark it as a solution.

 

Thanks!

Carli
Labels