Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
Thanks All !