Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor

Aggr() Function - Multiple Conditions

Hello everybody,

I want to create a new table using the aggr().

Simple example (in reality there are much more data)

Patient

Country

100

A

100

B

200

A

200

B

300

A

300

...

400

B

400

...

 

How, do I create a table, which shows me only the Patients which have lived in Country A, but never in Country C?

First Step in order to get the patients who have lived in A:

Count(Aggr(Count({<Country={"A"}>} Patient), Patient))

Second Step to exclude Country B?

Do yuo have any ideas for me :)?

Labels (1)
1 Solution

Accepted Solutions
Highlighted

May be this

Count({<Patient = p({<Country = {'A'}>})-p({<Country = {'C'}>})>} Patient)

or

Count({<Patient = p({<Country = {'A'}>})*e({<Country = {'C'}>})>} Patient)

 

View solution in original post

2 Replies
Highlighted

May be this

Count({<Patient = p({<Country = {'A'}>})-p({<Country = {'C'}>})>} Patient)

or

Count({<Patient = p({<Country = {'A'}>})*e({<Country = {'C'}>})>} Patient)

 

View solution in original post

Highlighted
Contributor
Contributor

Thank you very much 🙂 it worked! I'm so happy