Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
i have a field like quarter with values like 2018Q1,2018Q2,2018Q3,2018Q4,2019Q1
so whenever i open the dashboard i need to see latest two quarters as selected.
how to achive this?
output: 2018Q4,2019Q1 [ if 2019Q2 in the data the result will be 2019Q1 and 2019Q2] like dynamic latest two quarters
Thanks
documrnt settings -> trigers-> on open -> select in field ->
lets assume string is the field.
=MaxString({<string=-{"$(=maxstring(string))"}>}string) // this will give the second max string
=maxstring(string) / this will give the max string
atatching sample
@soniasweety wrote:
giving error in expression.
Well if your Quarters are string values this should work just fine. Did you change the field string to your quarter field? Can you please write your final expression here. I dont have the qlik license so would not be able to open it.
Isn't 2018Q4 the second highest quarter? do you have future quarter listed as well?
yes.
currently 2019Q1 is the max quarter 2018Q4 is the second max quarter.
so latest two quarters 2019Q1 and 2018Q4 to be selected.
=MaxString({<string=-{"$(=maxstring(string))"}>}string) // this will give the second max string =maxstring(string) / this will give the max string
the above will do if you want the max and second max quarter
for latest and second latest you can try
=year(today()) & 'Q' & ceil(month(today())/3) =year(ADDMONTHS(today(),-3)) & 'Q' & ceil(month(ADDMONTHS(today(),-3))/3)