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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Mahamed_Qlik
Specialist
Specialist

Multiple category

Dear all,

I have data as below :

ID COUNTRY
101 USA
101 INDIA
102 UK
103 USA
103 CANADA
103 RUSSIA
104 INDIA
104 USA
105 INDIA

 

We need to get 

1) count of ID who comes under "USA & INDIA" both

     ( expected output as count is 2) and those ID are 101 and 104

2) count of ID who comes under only "INDIA"

      ( expected output as count is 1) and that ID are 105

Labels (1)
3 Replies
hic
Former Employee
Former Employee

Count({<ID=P({<COUNTRY={USA}>} ID)*P({<COUNTRY={INDIA}>} ID)>} distinct ID)

Count({<ID=E({<COUNTRY= -{INDIA}>} ID)>} distinct ID)

Mahamed_Qlik
Specialist
Specialist
Author

Hi 

We have added new Month column and we want to group the above logic by month.

How can we achieve this or write aggr?

I tried as below but no luck :

AGGR(Count({<ID=P({<COUNTRY={USA}>} ID)*P({<COUNTRY={INDIA}>} ID)>} distinct ID),Month)

 

 

Mahamed_Qlik
Specialist
Specialist
Author

Hi

Here is the data is currently displaying:
Expression : 

COUNT({<CIVIL_ID=P({<BNFT_ID={'59'}>} CIVIL_ID)*P({<BNFT_ID={'56'}>} CIVIL_ID)>} distinct CIVIL_ID)


 

Mahamed_Qlik_0-1708401685072.png

 

we want to display only highlighted records because those records are with type 56 & 59 and in same month only