We are aware of an issue with the Search bar. Please use Advanced search for the time being while we troubleshoot. Thanks for your patience as we work on improving the community!

Alteryx Designer Discussions

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

Filtering months dynamically

Sharathkrishnan
5 - Atom

In the above output the solution fetches last year's records.but I want to fetch last 12 months irrespective of year

Eg., if the data is till july 2021..last 12 months would be  july 2020 to july 2021..

if the data is till feb 2020..last 12 months would be  july 2019 to july feb 2020..

and also I should be able to change number of months I fetch...

sometimes I might want to fetch last 4 months also

5 REPLIES 5
mceleavey
15 - Aurora

Hi @Sharathkrishnan ,

 

I've built this as an analytic app for you.

This way you can select the cut-off date and the number of months before the cut-off you wish to go back.

 

mceleavey_0-1623409352563.png

 

For example, when you run the app using the following button:

mceleavey_3-1623409468568.png

 

you get the following pop-up:

 

mceleavey_1-1623409387575.png

 

If you select 3rd of June 2021 and the prior 10 months you get the following:

 

mceleavey_2-1623409432679.png

I've attached the workflow.

 

I hope this helps.

 

M.

 

Sharathkrishnan
5 - Atom

Hi,

    But I need not want it as a app. It should fetch the latest date from the data and I need to traverse back to the number of months I mention.Fetching latest date should be doen automatically.. Can you help me with it?

mceleavey
15 - Aurora

@Sharathkrishnan ,

 

so you want 12 months back from the latest date?

 

I've built this to identify the latest date in the data, then remove any records that are older than 12 months before that date.

 

If you need anything different, please be specific.

 

I hope this helps,

 

M.

Sharathkrishnan
5 - Atom

Hi mceleavey ,

  This solution works..but I dont want to remove the records older than 12 months.i would like to retain them..can you help me with it?

mceleavey
15 - Aurora

@Sharathkrishnan , yes, they're on the F output of the filter. You can do whatever you want.

 

M.

Labels