App Development

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for
Did you mean:
Creator II

Set analysis intersection problem

Hi

I'm having some problems with set analysis.

In my example I have 2 clients who are identical but the set analysis gives different results. So I'm guessing I'm doing something wrong 🙂

 Client year has_product A 2020 0 A 2021 1 B 2020 0 B 2021 1 C 2020 1 C 2021 0

I want to see how many clients jumped from 0 to 1. So client A and B.

I used the following expressions:

• count(distinct { <year= {2020}, has_product= {0}> * <year = {2021}, has_product= {1}>} Client)
• count(distinct {< Client= P({<year= {2020}, has_product= {0} >} Client) > * < Client= P({<year= {2021}, has_product= {1} >} Client) >} Client)

But for some reason in my model it shows 0 for some clients where it should be 1.

I  can't change the model so I need to fix this with an expression.

Any suggestions?

1 Solution

Accepted Solutions
MVP

Hi

Try like below

Sum(Aggr(count(Distinct{ <year= {2020}, has_product= {0}>}Client)* Count(Distinct {<year = {2021}, has_product= {1}>} Client), Client))

Thanks & Regards,
Mayil Vahanan R
2 Replies
MVP

Hi

Try like below

Sum(Aggr(count(Distinct{ <year= {2020}, has_product= {0}>}Client)* Count(Distinct {<year = {2021}, has_product= {1}>} Client), Client))

Thanks & Regards,
Mayil Vahanan R
Creator II
Author

Thx it works.
I hope it won't affect the performance too much if I write many of these expressions 🙂