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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
ioannagr
Creator III
Creator III

multiple conditions KPI

Hello experts.

I have these filters: DiseasesCategory1, Result1, TestID1,ExaminationDate,DiseasesCategory2, Result2, TestID2

 

Each person can or may be tested for one of the diseases in category 1 or/and for  diseases in category2, either the same date or not, and the tests can be multiple for either disease.

I want to make a KPI to  count how many people have at least one positive result to each one of the diseases in each category.

I did something like:

count(aggr(count{<[Result1]={'positive'}>+ <[Result2]={'positive'}>+<[ExaminationDate]={"=max(aggr(max(date(([ExaminationDate])),'DD/MM/YYYY'),[Person]),[ExaminationDate])"}>} distinct [Person]))

but it gives me a very large number... The "problem" i fail to solve is that for each of the persons the dates can vary.

 

I want to count for each distinct person, for the last examination date for each disease the positive tests. I dont know what to do with the dates, because they can be the same day or completely other days.

Should the last "+" in my code be a "*"? ?

Thanks in advance !

0 Replies