Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Filter Current Quarter

markalves
8 - Asteroid

I have a list of dates that I converted from string to alteryx's time format.  It is now in Month, yyyy .  I want to filter only the current quarter dates.  I was able to figure out how to filter out current month, but I also need current quarter for a different report.  This is my formula for filtering current month. 

 

datetimeformat([DateTime_Out],'%y-%m')=datetimeformat(datetimetoday(),'%y-%m')

3 REPLIES 3
JagdeeshN
12 - Quasar
12 - Quasar

Hi @markalves ,

 

The below formula in the filter tool should give you rows belonging to the current quarter:-

 

DateTimeFormat(DateTimeNow(),'%Y Q') + ToString(Ceil(ToNumber(DateTimeFormat(DateTimeNow(),'%m'))/3))=DateTimeFormat([Date],'%Y Q') + ToString(Ceil(ToNumber(DateTimeFormat([Date],'%m'))/3))  

 

 

In the above formula [Date] would be your incoming date field.

 

Please find attached a sample workflow. 

 

Hope this helps.

 

Best,

Jagdeesh

markalves
8 - Asteroid

Thank you. This works perfectly!

Idyllic_Data_Geek
8 - Asteroid

@JagdeeshN - How do I create a dynamic filter for last 8 quarters. I have data coming in as 2020 Q1, 2021 Q2. And, the data type is Vwstring

Labels
Top Solution Authors