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.

Custom Filter

Tame
6 - Meteoroid

Hello -

 

 my current dataset has 5 years (2018-2022) of data and it is also broken down by quarters. I will receive 2023 data soon. 

How do i create a custom filter to show year 2022 and Q2,Q3 & Q4. When I get 2023 data I will need to Drop Q2 Then use Q3,Q4, and Q1 on 2023 and the cycle continues. Each qrt, the older qrt gets drop.

6 REPLIES 6
Raj
16 - Nebula

share some sample data as input and required output

Tame
6 - Meteoroid

so the basic filter only gives me one condition. I would like to use the custom filter to select both qrt and year. 

Yoshiro_Fujimori
15 - Aurora

Hi @Tame ,

It would be easier to handle to convert quarter to serial number, counting from a certain point of time.

Input

Yoshiro_Fujimori_0-1680236757669.png

Workflow

Yoshiro_Fujimori_1-1680236776173.png

Formula

Serial_Quarter = ([Year]-2021) * 4 + [Quarter]

Current_Serial_Quarter

  = (DateTimeYear(DateTimeNow()) - 2021) * 4
  + CEIL(DateTimeMonth(DateTimeNow()) / 3)

 

Output

Yoshiro_Fujimori_2-1680236799396.png

 

I hope this may be of some help.

Good luck.

Tame
6 - Meteoroid

Thank you Yoshiro I will try this!

Raj
16 - Nebula

If the data looks like this you can try this as well

Raj_0-1680238166814.png

 

Tame
6 - Meteoroid

Thank you :)

Labels
Top Solution Authors