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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
Pragya
Creator
Creator

Where clause and text value from a field

Hi Everyone !

 I am working on a hospital database and table details are

Patient number        Dischargeto             Date                      Time

212                                   Hospital1              16/10/2018          14:00

212                                   Hospital2               18/10/2018         10:00

212                                   Hospital3                20/10/2018        18:00

212                                    Home                        22/10/2018      10:00

213                                  Hostpital1                11/11/2018       11:00

213                                   Death                       14/11/2018          18:00

I was trying to make a Barchart with dimensions as Dischargeto and measures as 'Count(Patientnumber)

Ques 1:     

In this bar chart I don't want final destination as Death so want to use where clause( as said in Sql) where dischargeto <> death, how should I do In Qlik sense?

Ques 2:

Now I have to report on patients final destination  - which here will be home, it can be rehab or other options too else death. I want to filter this data on the base of latest date and time - I work in sql normally so I would have ordered on the patientnumber, date and time , or partition by patient number and then order by date and time and pick the top most entry as final destination. How should I do I Qlik sense - please advise?

 

Thanks beforehand

 

10 Replies
Vegar
MVP
MVP

Also , Is latest_destination a new variable that I am declarin?

The latest_destination  is a new field to your data model. Adding +1 for every row per patient.