Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Qlik sense Set analysis

In my dataset, the yearField is from 2010 to 2017. I would like to get the sum of most recent 10 year with Qlik sense Set analysis in KPI,

1: when I use:

     sum( {$< yearField = {"> 2007 "}  > } yearField ) ,

will get 20125 and it works.

2: but I need make the expression dynamic (2018, 2019, etc in the future)

3: When I used a Qlik function in Set analysis:

     sum( {$< yearField = {">(=( Year( Today()) -10 )) "}  > } yearField )

will get 0 but does not work any more.

4: I also tried with variable.

    define a variable, Year( Today()) - 10  (variable name: MostRecent10Years)

     when I used the variable

    Sum({ <yearField = { '$( > $(MostRecent10Years) )' }>}  yearField ) 

will get 0 but does not work either.


Any suggestion is appreciated!

10 Replies
Anonymous
Not applicable
Author

Thanks All !