Alteryx Designer Discussions

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

Formula for selecting date range

gsudharsanan
7 - Meteor

Dear Community / Experts,

 

The file having data for many years. Date in YYYY-MM-DD format.  What formula to be used to filter only items relating to the previous quarter. For eg:- If running the query in April 2021 it should pick up only date range 1st Jan 2021 to 31st March 2021. Similarly, when running the query in July 2021 it should pick up only date range 1st April 2021 to 30th June 2021. 

 

Seek your help / support. 

 

Sample file attached. 

21 REPLIES 21
binay2448
11 - Bolide

Hope this solution will help .

RolandSchubert
15 - Aurora
15 - Aurora

Hi @gsudharsanan ,

 

the DateTime functions can help you. I've attached a sample workflow.

 

2021-09-14_11-31-27.jpg

 

Let me know if it works for you.

 

Best,

 

Roland

Ar13f
8 - Asteroid

Dear @gsudharsanan,

 

the solution from me .. 

 

solution.png

hope this help you ..

gsudharsanan
7 - Meteor

Since the solution workflow is created in the latest version not able to open / import the workflow.

RolandSchubert
15 - Aurora
15 - Aurora

I've changed to version 2019.3,

gsudharsanan
7 - Meteor

Hi Roland,

 

Thanks for the quick revert.  Opening the workflow gives message that this workflow was created in the latest version.

When running the workflow it gives the following error message. 

Error: Filter (5): Parse Error at char(16): Unknown variable "Dates"

 

The date in my file is under the 8th column hence not sure whether any changes to be made in the formula.

gsudharsanan
7 - Meteor

Dear 

 

When running the workflow it gives an error message "Error: Input Data (1): File not found "C:\Users\1439293\Downloads\Date range query.xlsx"

 

Kindly advice. 

 

Regards

 

Ar13f
8 - Asteroid

dear @gsudharsanan,

 

please see this link below, how to downgrade/change the version of alteryx

 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Workflow-App-Version-Degrade/td-p/5879...

Ar13f
8 - Asteroid

Dear @gsudharsanan 

 

please change "the file or database" with your data in your hard drive ...

 

Snap321.png

Labels