Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone. I've been trying different formulas to achieve what I want but didn't succeed.
It's very simple. I have a list of codes and exams.
code | exam |
---|---|
A | 1 |
A | 2 |
A | 3 |
B | 1 |
C | 2 |
D | 5 |
Now, I need to count only those codes that have in exam at least values 1 AND 2. The outcome in this case should be 1 because code A is the only code containing 1 AND 2 among its exams.
Any thoughts?
Thanks!
i think you could have tried a bit more with the exemple i sent to you:
=count (distinct {<code = P ({<exam={"1"}>} code ) >*<code = P ({<exam={"2"}>} code ) > } code )
Hi! Try it
Aggr(Count( {$<exam = {1,2}>} code), exam)
Hello,
try
sum( {<code = P ({<exam={"1"}>} code ) >*<code = P ({<exam={"2"}>} code ) > } exam )
Thank you guys for your valuable time. Unfortunatly non of your solutions work. I need to show the result (in this case is 1) in a text object so I make sure the solution works.
Any other ideas?
i think you could have tried a bit more with the exemple i sent to you:
=count (distinct {<code = P ({<exam={"1"}>} code ) >*<code = P ({<exam={"2"}>} code ) > } code )
Thank you baptiste! It works now
Hi MARCHAND,
I to have the same problem but I need code rather than the count in the above expression. Can u please help me in achieving it.
Thanks in Advance,
Mukesh