Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How do I filter contents of a table and rank them at the same time?

Hello,

I am quite new to QlikView and need help with setting up a table.  This may seem long, but I wanted to include as much detail to get a reasonable response.

I have 2 sheets.  The first sheet shows all my patient's details by year and month and number of visits to our hospital.

In the second sheet I want three tables that only show patient's that were admitted to our hospital (so fitler the data to only include admitted patients):

1) Listing of all admitted patients with count of number of total hospital visits (Got this)

2) Listing of all admitted patients with count of only the number of hospital admission visits (cannot get this at all)

     -Issue: Total number of visits shown instead of just number of visits with admit status

3) Number 2 above, but that ranks only the top X patient's (i.e., top utilizers) (cannot figure this out)

Here are my fields (and possible necessary details):

1) Patient_Name

2) Patient_ID

3) Arrival_Date

4) Arrival_Year

5) Arrival_Month

6) Disposition

     -this here is where I would know if a patient was admitted or not, and would want to search this field to only include patient's that contain the text "Admit" as the word Admit might or might not be the first word in the field.

7) Visits_Flag

     -currently this is an expression that counts the number of visits: Sum(Flag)

My tables 2 and 3 are currently straight tables with two dimensions and two Calculated Dimensions-

Calculated Dimensions:

1) If(WildMatch(Disposition,'*Admit*'),Disposition)

2) Aggr(If(Rank(sum(Visits_Flag),4)<=100,Patient_ID),Arrival_Year,Patient_ID)

I do not know if this is correct and I cannot seem to get the correct number of visits with admit status and rank them.

Help is greatly appreciated.

3 Replies
Nicole-Smith

If you post a .qvw, it will be easier for us to help you:

Preparing examples for Upload - Reduction and Data Scrambling

Nicole-Smith

See the attached.

Not applicable
Author

Thank you for the response.

I may not be understanding what this is supposed to do, but it is not working for me.