Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
Not applicable

Subset analysis

Hi everybody,

I need to do a subset analysis from the UI. I've got a table that contains users and softwares that they use, every user can have one or more softwares.

I'd like to select only the users that have at least software A and C or B and C. Then, starting from this subset, I'd like to select only users that don't have software D.

How could I achieve this?

Thanks in advance

Best regards,

Nicolò

Tags (1)
1 Solution

Accepted Solutions
Highlighted
Not applicable

Re: Subset analysis

Hi everybody,

Andrey's help gave me an idea from where to start with and I solved using this:

Only({1}{<UserName = p({<Software={'Software9'}>})*p({<Software={'Software10'}>})+p({<Software={'Software8'}>})*p({<Software={'Software10'}>})-p({<Software={'Software11'}>})>}UserName)

View solution in original post

6 Replies
Highlighted
Honored Contributor

Re: Subset analysis

Hi Nicolò,


The solution will depend on the form in which your original data is stored. It would be nice to see their fragment.


Regards,

Andrey

Highlighted
Not applicable

Re: Subset analysis

Hi Andrey and thanks for your help.

My data are organized in this way: there's a table that contains Users with some features of them and another that contains Users with softwares,so Qlik automatically joins on UserNames.

Should I create a single table within the script?

Regards,

Nicolò

Highlighted
Honored Contributor

Re: Subset analysis

If the analysis is at the user interface level, is enough the tables are properly linked. If the amount of data is not large, there is no fundamental difference.

Highlighted
Honored Contributor

Re: Subset analysis

In attached file tried to give an example of your verbal description

Highlighted
Not applicable

Re: Subset analysis

Hi Andrey,

that is almost perfect! One last thing, you wrote:

Only({<Software={'Software10','Software9'}+{'Software7','Software8'}-{'Software4'}>}Client)


but I'd like to have


Only({<Software={'Software10','Software9'}+{'Software10,'Software8'}-{'Software4'}>}Client)

and I need to show a Client only if he has both Software10 and Software9 or both Software10 and Software8, but not if he only has got one of them (like only Software10 or only Software9).

Is it possible to solve this?

Thanks a lot,

Nicolò

Highlighted
Not applicable

Re: Subset analysis

Hi everybody,

Andrey's help gave me an idea from where to start with and I solved using this:

Only({1}{<UserName = p({<Software={'Software9'}>})*p({<Software={'Software10'}>})+p({<Software={'Software8'}>})*p({<Software={'Software10'}>})-p({<Software={'Software11'}>})>}UserName)

View solution in original post