2 Replies Latest reply: Nov 23, 2016 3:47 AM by Liron Baram RSS

    QlikSense set analysis behaviour - scope problem

    xxx yyy

      I have a set analysis as below:


      vYear : Year(today() )

      vDayOfYear: daynumberofyear(today())


      AccidentsTYTD: Count(Distinct {<Year, Year={'$(vYear)'}, DayOfYear={'<$(vDayOfYear)'} >} AccidentID)


      If I enter this as master item it behaves OK against other dimensions, but if it is set via load script (from a variable sheet) it calculates incorrectly against the dimension. My Question, why do master item and variable behave differently, and how can it be fixed?


      See an example below:



      The first column is entering expression directory in the table measures,

      second col is same expression already entered as master item,

      last column is calling a variable which is populated at load time using  LET $(vName) = '=' & lookup(...)