Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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:
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?
Hi
Try like below
Sum(Aggr(count(Distinct{ <year= {2020}, has_product= {0}>}Client)* Count(Distinct {<year = {2021}, has_product= {1}>} Client), Client))
Hi
Try like below
Sum(Aggr(count(Distinct{ <year= {2020}, has_product= {0}>}Client)* Count(Distinct {<year = {2021}, has_product= {1}>} Client), Client))
Thx it works.
I hope it won't affect the performance too much if I write many of these expressions 🙂