Alteryx Designer Desktop Discussions

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

Filter Expression

ShantanuDagar
8 - Asteroid

I have the following format for a table output anchor while creating a report.

 

    TYPE            QUARTER     YEAR                            TABLE

 

ABCDEFGH              4             2023              Table - View Browse Tool Report Tab
Fixed                         4             2023               Table - View Browse Tool Report Tab
ABCDEFGH               1             2024               Table - View Browse Tool Report Tab
ABCDEFGH               2             2024                Table - View Browse Tool Report Tab
Fixed                         2             2024                 Table - View Browse Tool Report Tab
ABCDEFGH             3            2024                  Table - View Browse Tool Report Tab
Fixed                       3            2024                   Table - View Browse Tool Report Tab
ABCDEFGH           4           2024                   Table - View Browse Tool Report Tab
Fixed                      4           2024                    Table - View Browse Tool Report Tab
ABCDEFGH           1           2025                    Table - View Browse Tool Report Tab
Fixed                      1           2025                           Table - View Browse Tool Report Tab
ABCDEFGH           2           2025                          Table - View Browse Tool Report Tab
Fixed                      2           2025                          Table - View Browse Tool Report Tab
ABCDEFGH          3            2025                          Table - View Browse Tool Report Tab
Fixed                     3            2025                          Table - View Browse Tool Report Tab
Fixed                     4             2025                          Table - View Browse Tool Report Tab
Fixed                     3             2026                          Table - View Browse Tool Report Tab
ABCDEFGH          3             2032                          Table - View Browse Tool Report Tab

 

Now I want to filter only Current Quarter (When the report is run) and next 3 quarters.

If I run today, it's quarter 4 of 2023, so Q4 2023, Q1-Q3 2024 Should be filtered. From above table 7 rows would be desired output as can be seen.

If run in Jan/Feb/March of 2024, i.e. Q1 of 2024, Q1-Q4 of 2024 must be filtered.

 

TIA

2 REPLIES 2
binuacs
20 - Arcturus

@ShantanuDagar try the below filter condition

image.png

cjaneczko
13 - Pulsar

Looks like @binuacs answered it. I had something similar using a filter tool as well. 

 

 

 

 

([Year] = DateTimeYear(DateTimeToday()) AND [Quarter] >= Ceil(DateTimeMonth(DateTimeToday())/3)) OR ([Year] = DateTimeYear(DateTimeAdd(DateTimeToday(), 9, 'month')) AND [Quarter] <= CEIL(DateTimeMonth(DateTimeAdd(DateTimeToday(), 9, 'month'))/3))

 

 

 

image.png

image.png

 

Labels