Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

Set Analysis expresion into another Set Analysis Expresion

Hi everybody, I have my sales defined like this:
SALES Expresion:
sum  ({$<INFOTYPE={'REAL'}>}[SALES MXN]/TC)/1000+sum({$<INFOTYPE={'UM6'}>}[SALES MXN]/TC)/1000
and I want to use my sales to get last year sales:
LAST YEAR Expresion
sum ({$<Year = {$(=only(Year) - 1) }, Month = {"<=$(=max(Month))"}>} Sales)
is just replacing my SALES Expresion into LAST Year Expresion?
is there any way to get this working?
1 Solution

Accepted Solutions
MVP
MVP

Set Analysis expresion into another Set Analysis Expresion

Your first expression should be equivalent to

=sum  ({$<INFOTYPE={'REAL','UM6'}>}[SALES MXN]/TC) / 1000

i.e. you can set multiple values within a set element. Does this result in correct values?

Then I would assume last years sales should be

=sum  ({$<INFOTYPE={'REAL','UM6'}, Year= {$(=only(Year)-1)}, Month={"<=$(=max(Month))"} >}[SALES MXN]/TC) / 1000

Hope this helps,

Stefan

2 Replies
MVP
MVP

Set Analysis expresion into another Set Analysis Expresion

Your first expression should be equivalent to

=sum  ({$<INFOTYPE={'REAL','UM6'}>}[SALES MXN]/TC) / 1000

i.e. you can set multiple values within a set element. Does this result in correct values?

Then I would assume last years sales should be

=sum  ({$<INFOTYPE={'REAL','UM6'}, Year= {$(=only(Year)-1)}, Month={"<=$(=max(Month))"} >}[SALES MXN]/TC) / 1000

Hope this helps,

Stefan

Not applicable

Set Analysis expresion into another Set Analysis Expresion

Wow!! it works perfectly,  excelent once again you helped me a lot.

Thank you very much Swuehl!!! 

Community Browser