Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Gurus,
I have a table like:
Date_Time | KPI 1 | KPI 2 |
---|---|---|
22/11/2017 15:30:34 | 34 | 47 |
22/11/2017 15:29:24 | 345 | 475 |
22/11/2017 15:28:45 | 34 | 64 |
22/11/2017 15:27:25 | 6 | 347 |
22/11/2017 15:26:17 | 6 | 45 |
22/11/2017 15:25:53 | 64 | 7 |
22/11/2017 15:24:45 | 5 | 574 |
Each line is a record and I would like to have a filter in QlikSense Application to filter las "n" records (something like a "Last n counter"). Is there any way to generate this?
Thanks!
Regards,
Jordi
rank function would help
suppose your aggregate function is sum(KPI1) then your expression would be something like this:
first create a variable called vKPI1 with the definition above
then your final expression is:
sum({<Customer={"=Rank($(vKPI1))< $(topN)"}aggr($(vKPI1),Customer))
and topN is a variable you can put in it 3 or any integer
if this is doesn't help send me a sample qvw file so that I can further help
Last n based on the order they are loaded? also, do you need dashboard wide selection or in a particular chart?
It would be last "n" Date_Times. Something like the "n" top values of Date_Time
I need to have the possibility to choose last 4 or 6 or 10 or etc... values.
I hope I'm explaining well...
Thanks,
Regards,
Jordi
May be like this
Sum({<Date_Time = {"$(='>=' & TimeStamp(Max(Date_Time, vVar), 'DD/MM/YYYY hh:mm:ss'))"}>}KPI1)
vVar is a variable which will decide how many top values you want to see.... 4, 6, 10 etc