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.

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
16 - Nebula
16 - Nebula

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
10 - Fireball

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
16 - Nebula
16 - Nebula

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
10 - Fireball

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
10 - Fireball

Dear @gsudharsanan 

 

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

 

Snap321.png

Labels