Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I'm setting up a Qlik report, using Qlik Desktop and the the qsVariable extension.
It works great except for an expression where I'm trying to use a > or < comparison
The following works :
sum({<Week={$(VCurrentWeek)}>} qte_commandee)
As soon as I try to replace the = by <= (lower than), no data appear in my analysis :
sum({<Week=<{$(VCurrentWeek)}>}qte_commandee)
I have also tried
sum({<Week={'<="$(VCurrentWeek)}>}qte_commandee)
and many other trials...with no luck
At the same time, I have tried to transform the Week field and the VCurrentWeek into a numeric value (num#) since all my weeks are formated on two digits
the week field is populated in this way : num(week(order_date),'00')
The $VCurrentWeek is : num(week(now()),'00')
So, I gess the first error comes from the proper use of <= in the expression.
I also guess that I will need to transform the week number filed and variable into a numerica value
How can I do ?
Thanks
pat
Hi, Patrice. You're right and if you convert Week field into numeric it should work.Try this then
sum({< Week = {"$(='<=' & num(week(now()),'00'))"} >} qte_commandee)
hello again
using this thread :Set Analysis for Less than Equal
I have updated my expression with no luck :
Sum({<date_saisie.autoCalendar.Week ={"<=$(=VCurrentWeekNum)"}>}qte_commandee)
As you can see, I now have only numeric values in my expression :
date_saisie.autoCalendar.Week -> numeric since I use autoCalendar.Week (date_saisie = order date)
$VCurrentWeekNum -> new variable that I have set to 40 (I will then set it to week(now(()
Any help would be appreciated
Hi, Patrice. You're right and if you convert Week field into numeric it should work.Try this then
sum({< Week = {"$(='<=' & num(week(now()),'00'))"} >} qte_commandee)
Thanks for your help, it did work
patrice