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')
Solved! Go to Solution.
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
Thank you. This works perfectly!
@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