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

get values in (1,3,4,....) using set analysis

I have to design a Set analysis expresion in order to get a subset from a table. This table(Customer) have an attribute 'Code'. I have to get the rows IN (2,4,6, 10) for example. I guess that I have to use the =Only sentence but I am not sure. anyone of you know the answer?

Thanks in advance

1 Solution

Accepted Solutions
swuehl
MVP
MVP

So you want to get the subset from the table like selecting in Code, but where / in which context do you want to get the subset? Using set analysis will require an aggregation function, so you can indeed use only() or something else like sum(), whatever is appropriate.

Maybe you want to show the sales for customers, but limited to the subset mentioned. So create a straight table, use Customer field as dimension and as expression:

=sum({<Code= {2,4,6,10}>} Sales)

Or CustomerID as dimension and as expression:

=only({<Code= {2,4,6,10}>} CustomerName)

Not sure if this is of any help, but if not, I think you need to clarify your setting and requirement.

Regards,

Stefan


View solution in original post

1 Reply
swuehl
MVP
MVP

So you want to get the subset from the table like selecting in Code, but where / in which context do you want to get the subset? Using set analysis will require an aggregation function, so you can indeed use only() or something else like sum(), whatever is appropriate.

Maybe you want to show the sales for customers, but limited to the subset mentioned. So create a straight table, use Customer field as dimension and as expression:

=sum({<Code= {2,4,6,10}>} Sales)

Or CustomerID as dimension and as expression:

=only({<Code= {2,4,6,10}>} CustomerName)

Not sure if this is of any help, but if not, I think you need to clarify your setting and requirement.

Regards,

Stefan