Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

set analysis expression

hi there,

ı have a table like that :

   

IDYEAR_MONTHcategorymoney
3969385201502car1.206
3969385201506bus2.455
28289815201502x610
22291674201506car1.224
23481102201506t563
10126853201508bus445
360150201503r1.231
1631437201511w523

ı want to filter ID s like that :

Display ONLY the ID that includes BOTH category = "car" and "bus" 

( here the answer is ID='3969385' that is the one includes both, there are other ID that only inclues one of them that is useless for us)

Anyone can help? thank you.

22 Replies
sunny_talwar

May be this

Sum({<ID = {"=Count(DISTINCT {<category = {'car', 'bus'}>} category) = 2 and Only({<category = {'bus'}>} YEAR_MONTH) > Only({<category = {'car'}>} YEAR_MONTH)"}>} money)

or this

Sum({<ID = {"=Count(DISTINCT {<category = {'car', 'bus'}>} category) = 2 and Max({<category = {'bus'}>} YEAR_MONTH) > Max({<category = {'car'}>} YEAR_MONTH)"}>} money)

The problem is that you are sharing a very small set of data and it is difficult to know what you might need based on your complete data set....

Anonymous
Not applicable
Author

yes it worked! my friend. Thank you for your effort.

sunny_talwar

Awesome ... Consider marking any helpful responses for future visitors.

Best,

Sunny