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

lol sure...

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

Anonymous
Not applicable
Author

thank you my friend, that worked like a charm.

but here the case I want is to FILTER them also. I want to show only the ID s that has this condition on table.

sunny_talwar

Filter the ids in the script?

Anonymous
Not applicable
Author

yes filter them in table.(not in script) just display the ones on that condition

sunny_talwar

In a single table or limited multiple table? or throughout the dashboard?

Anonymous
Not applicable
Author

Sunny thanks again. But what if I need another case like:

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

AND

YEAR_MONTH of the BUS is greater than the YEAR_MONTH of the CAR

sunny_talwar

Where are you looking to get this? Would you be able to share a sample and explain where you are looking to get this?

Anonymous
Not applicable
Author

the same situation, my aim is to filter the data on that conditions.

hi there,

ı have a table like that :

  

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

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

AND

YEAR_MONTH of the BUS is greater than the YEAR_MONTH of the CAR

sunny_talwar

But where exactly are you looking to see this info? In a chart or throughout your dashboard or just filter out in the script... I am a little confused

Anonymous
Not applicable
Author

in a chart (table) by expression