Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
davdiste
Partner - Creator
Partner - Creator

SET MODIFIER 1 IN SET ANALYSIS

Hi,

Is it possible to apply the set modifier {1< in set analysis, only on a single group of the expressio? i.e, for the expression presented below, I need that the set modifier 1 shall acts only on the dimension ANNO, with the possibility of selecting subsets of other groups considered in the expression (COD_CAT, COD_PROD).

=sum({1<ANNO = {$(=max(ANNO)-1)}, COD_PROD= {'111'}, REGIME = {'1'},COD_CATEG = {'120200','120204','120206'}>}NUMBER)

Thanks

Davide

1 Solution

Accepted Solutions
davdiste
Partner - Creator
Partner - Creator
Author

Sorry all!

I've found the solution I was looking for, and It it seems to work.

I more simple and doesn't require the set modifier {1<.


Probably was not the year (ANNO)  the dimension that I should fix but the month (MESE).

=sum({$<ANNO = {$(=max(ANNO)-1)},MESE= {'*'}, COD_PROD= {'111'}, REGIME = {'1'},COD_CATEG = {'120200','120204','120206'}>} NUMBER)

View solution in original post

5 Replies
dominicmander
Partner - Creator
Partner - Creator

HI Davide,

You can use set analysis within the dollar expansion for ANNO, so ...

=sum({$<ANNO = {$(=max({1}ANNO)-1)}, COD_PROD= {'111'}, REGIME = {'1'},COD_CATEG = {'120200','120204','120206'}>}NUMBER)


... is that what you mean?

sunny_talwar

May be you are looking for this:

=Sum({<ANNO = {$(=Max(ANNO)-1)}, COD_PROD *= {'111'}, REGIME = {'1'}, COD_CATEG *= {'120200','120204','120206'}>} NUMBER)

If you don't want to see selection in ANNO to impact, then this:

=Sum({<ANNO = {$(=Max({1}ANNO)-1)}, COD_PROD *= {'111'}, REGIME = {'1'}, COD_CATEG *= {'120200','120204','120206'}>} NUMBER)

davdiste
Partner - Creator
Partner - Creator
Author

Thx Dominc,

I've tried your solution and It doesn't work as I wish. Indeed if I select a month of the year , the result of the expression change (unlike my example above, where all the dimension of the expression are fixed).


I need the result to be fixed for the dimension ANNO and selectionable (modifiable) for the other dimension of the expression.


Thanks anyway.

Davide

davdiste
Partner - Creator
Partner - Creator
Author

Sorry all!

I've found the solution I was looking for, and It it seems to work.

I more simple and doesn't require the set modifier {1<.


Probably was not the year (ANNO)  the dimension that I should fix but the month (MESE).

=sum({$<ANNO = {$(=max(ANNO)-1)},MESE= {'*'}, COD_PROD= {'111'}, REGIME = {'1'},COD_CATEG = {'120200','120204','120206'}>} NUMBER)

davdiste
Partner - Creator
Partner - Creator
Author

Thx Sunny,

The symbol * you put  after the dimension (COD_PROD *) is an operator?

What it means?

Bye