Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor

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
Highlighted
Specialist III
Specialist III

Well, maybe this will help you:

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

Cheers

Thiago Justen Teixeira Gonçalves
WhatsApp: 24 98152-1675
Skype: justen.thiago
Highlighted
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


Highlighted
Master
Master

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

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

Highlighted

May be this

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

Highlighted
Contributor
Contributor

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