We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Select current year

kauser
8 - Asteroid

Hello, 

I have a input file where it has listed all the years from 2012- 2035. now i can pick current year 2024 from select tool but then in next year how it will pick automatically 2025. 

 

select tool- 

True2012Double8  
True2013Double8  
True2014Double8  
True2015Double8  
True2016Double8  
True2017Double8  
True2018Double8  
True2019Double8  
True2020Double8  
True2021Double8  
True2022Double8  
True2023Double8  
True2024Double8  
True2025Double8  
True2026Double8  
True2027Double8  
True2028Double8  
True2029Double8  
True2030Double8  
True2031Double8  
True2032Double8  
6 REPLIES 6
Manoj_k
9 - Comet

Hi @kauser i have attached the workflow for your reference with your data

cjaneczko
13 - Pulsar

You can use the following in a filter tool, where Field1 is the year column.

 

 

[Field1] = tonumber(datetimetrim(datetimenow(),'year'))

 

kauser
8 - Asteroid

My bad actually data comes like below and how can i pick current year column - 

 

SALESITEMSTYPEQUALITY 202020212022202320242025202620272028202920302031203220332034
ABCZSGOOD      5,648.00    11,296.00    22,592.00       45,184.00       90,368.00     180,736.00     361,472.00       722,944.00    1,445,888.00    2,891,776.00      5,783,552.00    11,567,104.00    23,134,208.00       46,268,416.00       92,536,832.00
ABCZSGOOD      8,472.00    16,944.00    33,888.00       67,776.00     135,552.00     271,104.00     542,208.00    1,084,416.00    2,168,832.00    4,337,664.00      8,675,328.00    17,350,656.00    34,701,312.00       69,402,624.00     138,805,248.00
ABCZSGOOD    16,944.00    33,888.00    67,776.00     135,552.00     271,104.00     542,208.00  1,084,416.00    2,168,832.00    4,337,664.00    8,675,328.00    17,350,656.00    34,701,312.00    69,402,624.00     138,805,248.00     277,610,496.00
ABCZSGOOD    33,888.00    67,776.00  135,552.00     271,104.00     542,208.00  1,084,416.00  2,168,832.00    4,337,664.00    8,675,328.00  17,350,656.00    34,701,312.00    69,402,624.00  138,805,248.00     277,610,496.00     555,220,992.00
ABCZSGOOD    67,776.00  135,552.00  271,104.00     542,208.00  1,084,416.00  2,168,832.00  4,337,664.00    8,675,328.00  17,350,656.00  34,701,312.00    69,402,624.00  138,805,248.00  277,610,496.00     555,220,992.00  1,110,441,984.00
ABCZSGOOD  135,552.00  271,104.00  542,208.00  1,084,416.00  2,168,832.00  4,337,664.00  8,675,328.00  17,350,656.00  34,701,312.00  69,402,624.00  138,805,248.00  277,610,496.00  555,220,992.00  1,110,441,984.00  2,220,883,968.00
Manoj_k
9 - Comet

Hi @kauser updated the workflow as required

DataNath
17 - Castor
17 - Castor

Hey @kauser, you can use a Dynamic Select tool to handle this:

 

[Name] IN ('SALES','ITEMS','TYPE','QUALITY')
OR
[Name] = ToString(DateTimeYear(DateTimeToday()))

 

CurrentYearField.png

nagakavyasri
12 - Quasar

@kauser another way of doing this:

 

Screenshot 2024-10-08 143554.png

Labels
Top Solution Authors