Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

rvijayanth
New Contributor III

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.

Tags (1)
1 Reply

Re: How to implement AND logic between two dimension values in QLikSense

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