Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
rvijayanth
Creator
Creator

How to implement AND logic between two dimension values in QLikSense

When we select multiple filters in QlikSense filters, they work like an OR condition. How to design a filter which will ONLY return records where the selected dimensions all exist together.

For example consider the below data:

Patient IDIssue
101Fever
101Headache
101Pain
101Weight Gain
101Nausea
102Fever
102Headache
102Pain
103Fever
103

Pain

When I select Fever AND Headache I only want to see patient id 101 and 102.

By default if I select these two values, I will get all these ids, I ONLY want where the two dimension values exist together for an ID.

1 Reply
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

This set should do it:

{<[Patient ID]={"=count(DISTINCT Issue) = GetPossibleCount(Issue)"}>}

Exact syntax depends on the context. For example, to create a filterpane:

=aggr(

only({<[Patient ID]={"=count(DISTINCT Issue) = GetPossibleCount(Issue)"}>}

[Patient ID])

, [Patient ID])

For a chart expression that for example counts total visits:

count({<[Patient ID]={"=count(DISTINCT Issue) = GetPossibleCount(Issue)"}>} DISTINCT VistiId)


-Rob

http://masterssummit.com

http://qlikviewcookbook.com