Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
I need your help guys,
I have a variable named : vIsPreviousPeriode
When I use this variable in a set expression to feed a column in a table objet, I don't get the good result ! (all the time 0 value !!!)
1. First I calculate the vIsPreviousPeriode
2. I use this syntax : =SUM({$<Myfield = {$(=vIsPreviousPeriode)}>} Mymeasure)
What is Myfield? and how do you define your variable?
When I write the value's string for testing, iI have athe right response :
=SUM({$<Myfield = {"JUN-17"}>} Mymeasure) ===> Ok.
=SUM({$<Myfield = {$(=vIsPreviousPeriode)}>} Mymeasure) ===> 0 (wrong)!
MyField is a field in my logical table
vIsPreviousPeriode is a variable defined in varibales Editor (Qlik Sense)
Is MyField read as a date field by QlikView or Qlik Sense (whichever you are using)?
MyField is a string (Qlik Sense)
How do you create this in the script?
vIsPreviousPeriode
The varibale is declared in the Qlik expression -variables (User interface) not in the Load editor
The variable «vIsPreviousPeriode» is delared like that :
$(vIsCurrentMonthPeriode)&'-'&Right($(vIsPreviousYear),2)
vIsPreviousPeriode will store values like these : JUN-17 ; JUL-17 ; REG-16;...
Try this
=Sum({$<Myfield = {"$(=vIsPreviousPeriode)"}>} Mymeasure)