Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Im trying to get the second highest date from my selected date.
My approach is to filter all less than selected date number and get the max from that.
count({1<date_num={"<$(=Max(date_num))"}, date_num2=max(date_num2)>}ReportName)
Hi @hov
Take a look to this post I replied a couple of days ago.
it’s a bit different because wasn’t using date format but text as date
https://community.qlik.com/t5/New-to-Qlik-Sense/Get-second-max-value-of-a-text-value/td-p/1988828
I would try
var1
=Max(DateField)
var2
=max({< field-={"$(var1)"} >}field)
Use the = sign when defining the variables
Now you should have the two highest date
But Here I don’t understand what you are trying to do
count({< date_num={"<$(=Max(date_num))"}, date_num2=max(date_num2)>}ReportName)
but following your expression, should be
count({< date_num={"<$(var1)"}, date_num2={'$(var2)'}>}ReportName)
hope this works for you
best,