1 Reply Latest reply: Mar 13, 2015 11:26 AM by Jonathan Poole RSS

    Variables not working in Qlik Sense

    Vijay Kumar

      I am creating a chart to show the count of products in Qlik Sense.

       

      I have set up the variable in the script editor as LET vMonthPrevious = MonthName(Today())-1;

       

      In the chart - Dimension is Products and expression is Count({<Month={$(vMonthPrevious)}>}Products)

       

      The result is a blank chart.. Can someone help me...

        • Re: Variables not working in Qlik Sense
          Jonathan Poole

          hi there,

           

          try using 'SET'

           

          SET  vMonthPrevious = MonthName(Today())-1;


          also put $(vMonthPrevious) in a text/image object just to be sure its calculating the result in right format.


          Even after using SET and reloading, you may still need some adjustments or interpretation/formatting functions to get the equivalence operation in the SET to work as you need.


          Count({<Month={'$(vMonthPrevious)'}>}Products)