Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Date Filter - End of Month

JDong
8 - Asteroid

Hi Team,

 

Please refer to the attached data.

 

How do I create a formula to select dates until last 2 months until end of month only. 

 

Ex: In the above I want to filter out data for the months of Nov 22 and Dec 22. However, it should show all dates until Oct 2022. This should work based on current system month irrespective of the day in the month.

 

Thanks

7 REPLIES 7
PanPP
Alteryx Alumni (Retired)

Hi @JDong 

 

I have uploaded a sample WF that gets the last 2 months. 

 

 

ShankerV
17 - Castor

Hi @JDong 

 

If I understand your requirement correctly, I have filtered the records from last 2 month start date and this current month end date.

 

ShankerV_0-1670577810357.png

 

 

Have displayed also OCT month dates, let me know if this filter holds good or if you have questions please let me know. 

 

Can tweak my solution according to your need.

 

 

JDong
8 - Asteroid

Thanks for the reply. I only need dates until Oct 2022...all dates starting Nov 1st till date should be removed.


Anyway this can be achieved as it also needs to be dynamic for every month change

 

ShankerV
17 - Castor

Hi @JDong 

 

Please find the result for only OCT 2022.

 

ShankerV_0-1670578689573.png

 

ShankerV
17 - Castor

Hi @JDong 

 

Yes, my solution will be always dynamic, if you run on Jan 2023, it will fetch the result for Nov 2022. i.e 2 months prior the current month you are running.

 

The below dynamic formula helps to do it.

 

ShankerV_0-1670578811864.png

 

Hope your issue is resolved. Feel free to mark helpful answers as a solution, so that future users with the same issue can find them easier!!!!

 

ShankerV_1-1670578861941.png

 

Many thanks

Shanker V

 

 

JDong
8 - Asteroid

@ShankerV  Sorry maybe I was not clear...I wish to see all of the data until Oct 2022, but remove data for last 2 months. So I do not want to see data for Nov 2022 and Dec 2022.

 

The solution you help shows data for only last 2 months I suppose ...thanks 

PanPP
Alteryx Alumni (Retired)

Hi @JDong 

 

Below is a workflow attached that filters out 2 months from the current month.

 

The true anchor will have all dates up to Oct and including Oct.

The false anchor will have Nov/Dec.

 

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

Labels
Top Solution Authors