Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am currently trying to create a date range filter in QlikSense using set analysis and the qsVariable extension, however I am having trouble in getting this to work.
Initially I was trying:
Sum({$<
[PP.PaymentReceivedDate.autoCalendar.Date]>={$(vFrom)},
[PP.PaymentReceivedDate.autoCalendar.Date]<={$(vTo)},
StatusFlagCode = {$(vStatusFlag)}
>}[PP.ReceivedAmount])
This seemed fairly logical to me, but returned zero results. After some investigation it was suggested that I try the following:
Sum({$<
[PP.PaymentReceivedDate.autoCalendar.Date]={'>=$(=vFrom)'},
[PP.PaymentReceivedDate.autoCalendar.Date]={'<=$(=vTo)'},
StatusFlagCode = {$(vStatusFlag)}
>}[PP.ReceivedAmount])
Unfortunately this also does not work, and it appears that the variable is not recognized within, as it in enclosed within quotation marks:
Any suggestions would be appreciated!
James
So it looks like the following works in this situation:
[PP.PaymentReceivedDate.autoCalendar.Date]={"$(= '>=' & date(vFrom) & '<=' & date(vTo))"},
The script editor still doesn't highlight the variables here, but it works in practice!