Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Highlighted
moningi13579
New Contributor III

Set Analysis in Qliksense

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

5 Replies
Highlighted

Re: Set Analysis in Qliksense

What is the exact error that you are facing?

Highlighted
moningi13579
New Contributor III

Re: Set Analysis in Qliksense

it is not displaying any value

Highlighted

Re: Set Analysis in Qliksense

Would you be able to share a sample?

Highlighted
praveenavelagap
Contributor III

Re: Set Analysis in Qliksense

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

moningi13579
New Contributor III

Re: Set Analysis in Qliksense

In MonthYear column it is passing as 'Sep 16'