Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All.
This works for me:
count(distinct if (DC>0,studentid)) - count students who received direct or consult services
and this works too:
count( distinct if ( (Ref>0) ,studentid )) - count students who were screened or evaluated
BUT, this does NOT work:
count( distinct if ( (Ref>0) and (DC>0) ,studentid )) - count students who were screened or evaluated and who received direct or consult services; this expression always returns a ZERO
count({<ref={‘>0’},DC={‘>0’} } studentid)
or
count(Distinct{<ref={‘>0’},DC={‘>0’} } studentid)
use set analysis instead
Count ({<ref={">0"},DC={">0"}>} distinct studentid)
if I am recalling right. there is a Function AND() you would have to use.
Let me see if I can provide you a detail.
count( distinct if ( AND(Ref>0,DC>0) ,studentid ))
or
count( distinct if (Ref>0 and DC>0 ,studentid ))
and May be this
count( aggr(distinct if (Ref>0 and DC>0 ,studentid )))
Martin Pohl, thank you for your reply, your expression:
Count ({<ref={">0"},DC={">0"}>} distinct studentid)
is acceptable to the Editor, but it returns the same value as
count(distinct if (DC>0,studentid))
Hi,
you can try below method,
Method 1: by creating cal. measure using set analysis
Count(distinct {$<Ref={">0"},DC={">0"}>} studentid
Method 2: by creating cal. measure using if condition
if(Ref>0 and DC>0, count(distinct studentid) )
Thanks,Deva
Hi,
Your expression should have worked, something else is happening.Yes, set analysis is better, but your expression should've worked,
Please share more information such as app, data, screenshots?
Cheers,
Luis