5 Replies Latest reply: Sep 8, 2016 1:34 PM by vivek Moningi RSS

    Set Analysis in Qliksense

    vivek Moningi

      Hi Guys,

       

      I am facing a problem in the set analysis expression, I have an inline table in which I have 'this month','last month','last 6 months' as columns so when the user selects any of these then the value should filter based on this , so I am passing the value in the set expression as variable but I am not able to get the value

       

      The expression is:

       

      "IF(

        GetFieldSelections([swL12W])='This Month'

          ,'MonthYear={"<=$(=date(Date(Today()),'MMM YY'))"}'     -

          , IF(

          GetFieldSelections([swL12W])='Last Month'

              ,'MonthYear={"$(=date(addmonths(Date(Today()),-1),'MMM YY'))"}'

                 , IF(

          GetFieldSelections([swL12W])='Last 6 Months'

                          'MonthYear={">$(=date(addmonths(Date(Today()),-6),'MMM YY')) <=$(=date(Date(Today()),'MMM YY'))"}'

              )

          )

          )"

       

      the column name MonthYear is having the month as 'Aug 16'

      and I am storing it in the variable 'vSwitchMonths'  and I passing it in the expression as

      sum({<$(vSwitchMonths)>}units_delivered)

      so can someone help me out in rectifying my error

       

      Thanks,

      Vivek