Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
KiruthikaA
Contributor II
Contributor II

Variable increment every year

Hi,

I would like to create a variable in the frontend that contains a year that updates every time there is a reload.

The value should iterate from 2000 to the current year

Labels (1)
7 Replies
JordyWegman
Partner - Master
Partner - Master

Hi,

Does that mean with 21 reloads it's in the current year and then needs to stop?

Jordy

Climber

Work smarter, not harder
KiruthikaA
Contributor II
Contributor II
Author

Hi Jordy,

Not 21 reloads 

I need a variable  in the front end that contains a year and the value should iterate from 2000 to the current year

Thanks,

Kiruthika 

JordyWegman
Partner - Master
Partner - Master

Hi Kiruthika,

I think you need to be a bit more specific. The way I see it right now is:

  1. Your year is 2000
  2. Application reloads
  3. Your year is 2001
  4. Application reloads
  5. Your year is 2002
  6. Etc.

Is this correct?

Jordy

Climber

Work smarter, not harder
KiruthikaA
Contributor II
Contributor II
Author

Hi Jordy, 

My application contains data from 2000 to now

I need to create a variable in the front end  year value should iterate 

Thanks,

Kiruthika 

JordyWegman
Partner - Master
Partner - Master

Hi Kiruthika,

This now makes a bit more sense. But I'm still not there.. for what is the variable needed in the front-end?

Does an user need to select this 'year variable' and then get the data from that specific year?

Jordy

Climber

Work smarter, not harder
KiruthikaA
Contributor II
Contributor II
Author

yes

JordyWegman
Partner - Master
Partner - Master

Okay, but you can create a year field based on the date field in your data.

Year( YourDateField) ) as Year

 

Then add this to the front-end and it's done.

 

Or you can add it as set analysis in your formulas like:

Sum( {$< Year = {'$(vYear)'}>} YourField )

 

Where you let vYear be every possibility by the user.

Jordy

Climber

Work smarter, not harder