Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

variable time range

Hello!

I need to include in a analisys set, a variable range running from 2010 until the term is applied (Not today ())

That is, if I make a calculation for 2013 that would range from 2010 to 2013 and if it did in 2016 would range from 2010 to 2016

count ({<SET ANALISYS>} if (Reactivation = 'YES', NumeroDeAfiliado))

Thank you very much!!

1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

count ({<YEAR = {">=2010&<=$(vYearSelection)"}>} if (Reactivation = 'YES', NumeroDeAfiliado))


where variable

vYearSelection = getfieldselection(YEARFIELD)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

7 Replies
sunny_talwar

If you make calculation? How do you make calculations here? Do you mean make selection in year field?

May be this:

Count({<Year = {'>=2010<=$(=Max(Year))'}, Reactivation = {'YES'}>} NumeroDeAfiliado)

vinieme12
Champion III
Champion III

count ({<YEAR = {">=2010&<=$(vYearSelection)"}>} if (Reactivation = 'YES', NumeroDeAfiliado))


where variable

vYearSelection = getfieldselection(YEARFIELD)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Not applicable
Author

hi! Thank you Vineeth!

As I create "vYearSelection" variable in the script?

don`t take that as a function.

sunny_talwar

You want to create it in script?

Not applicable
Author

Yes, just the variable 'vYearSelection'

sunny_talwar

Then how will this be dynamic? I am missing something here?

What did you mean here:

"if I make a calculation for 2013 that would range from 2010 to 2013 and if it did in 2016 would range from 2010 to 2016"

vinieme12
Champion III
Champion III

SET vYearSelection = getfieldselections(YEARFIELD);

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.