Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

QlikView Variable Expansion in set expression

Hi,

I have set the variable as

vqc

= if(Month([SNP Process Date])='Feb' or Month([SNP Process Date])='Mar' or Month([SNP Process Date])='Apr','Q2' & Year([SNP Process Date]),

       if(Month([SNP Process Date])='May' or Month([SNP Process Date])='Jun' or Month([SNP Process Date])='Jul','Q3' & Year([SNP Process Date]),

              if(Month([SNP Process Date])='Aug' or Month([SNP Process Date])='Sep' or Month([SNP Process Date])='Oct','Q4' & Year([SNP Process Date]),

                     if(Month([SNP Process Date])='Nov' or Month([SNP Process Date])='Dec','Q1' & (Year([SNP Process Date])+1),

                           if(Month([SNP Process Date])='Jan','Q1' & Year([SNP Process Date]),

                           )))))

and I'm calling this variable in my text box with the following set analysis.

=num(sum({<Quarter_Check = {$(vqc)},

[SNP Group Source Code]={"SNI","WR"},[Sales Order Type Category Code]={"TO"},

[Supplier]={"(1) OEM Partners","(2) RVC","(3) HPN","(4) ODM Partners","(7) OEM"},

[Profit Center L0 Name]={"EMEA"}>}[Secured Position Net USD Amount])/1000,'#,##0')

this does not work. Please help.

1 Reply
Highlighted

There is more than a problem:

in set analysis you can use field={var} but the right side of the expression must have 1 value so you can use Max, Min and so on but not expressions that returns more than one value.

Another problem is the sysntax, but before this, try to define another expressoin