Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
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.

1 Solution

Accepted Solutions
sunny_talwar

lol sure...

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

View solution in original post

22 Replies
sunny_talwar

May be like this

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

jtay
Contributor III
Contributor III

maybe this one:   Count({<match(category,'car','bus')>}ID)

Anonymous
Not applicable
Author

it says , error in set modifier

Anonymous
Not applicable
Author

bad field names : sum

sunny_talwar

You provided that field in your data my friend

Capture.PNG

I guess it would be helpful if you don't provide bad field names: sum

sunny_talwar

The set analysis is working... have a look

Capture.PNG

Anonymous
Not applicable
Author

my bad , you are right. ı changed it to "money"

sunny_talwar

edit what? what are you trying to edit?

Anonymous
Not applicable
Author

ok ı fixed it . edited.

can you write the formule accdng to that please