Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How do I find the number of patients with 2 or more visits in a given year?

My fields are Year, Visits, Mbr_Id, Provider

So, I need to show how many members by Provider had 2 or more visits.  I don't even know where to start.

If visits >= 2 ,count(distinct(Mbr_Id)) but I am not sure how to determine  if a mbr had more than one visit.  Is there anyone that can help?

5 Replies
Thiago_Justen_

Well, maybe this will help you:

Aggr (Count ({<Visits={">=2"}>}Distinct Mbr_Id),Provider)

Cheers

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
devarasu07
Master II
Master II

Hi,

let say user selected as Year 2018 then

Dimension:

Provider

Measure:

count (distinct  {$<Year={"$(=Max(Year))"},Visits={">=2"}>} Mbr_Id)


if still has issue, can you your mock data and expected output. tks


Thanks

Deva


shiveshsingh
Master
Master

//if(count(Visit)>'2',Count(Mbr_Id),'NA')

Count(distinct {<Visit = {">=2"}>}Mbr_Id)

sunny_talwar

May be this

Count(DISTINCT {<Mbr_Id = {"=Count(DISTINCT Visit) >= 2"}>} Mbr_Id)

Anonymous
Not applicable
Author

This is working, but is it possible to replace the =Max(Year) with a variable $(vPriorYr) and the Visits with another variable $(Visits)