
Contributor
2019-04-05
11:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to use AND or OR operators in distinct count function
Hi community,
I am rather new to Qlik Sense and I am facing difficulties in counting distinct document IDs under the condition that they are neither "n/a" nor "tbd".
I tried this:
textCount(distinct {<Doc_ID-={"n/a"},[Doc_ID]-={"tbd"}>} Doc_ID)
But as you can guess I was not successful. If I keep only one of the tests result is 29, but if I add both result becomes 30 instead of the expected 28.
Any help welcome!
1,708 Views
3 Replies

Partner - Master III
2019-04-05
11:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
change it to this
textCount(distinct {<Doc_ID-={'n/a', 'tbd'}>} Doc_ID)
textCount(distinct {<Doc_ID-={'n/a', 'tbd'}>} Doc_ID)

Specialist III
2019-04-06
03:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
or
textCount(distinct {<Doc_ID-={'n/a', 'tbd'}>} Doc_ID)
for AND
textCount(distinct {<Doc_ID-={'n/a',} and Doc_ID-={'tbd'}>} Doc_ID)
Channa
1,679 Views


Specialist III
2019-04-06
07:51 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please see the following post in Qlik forum for Set Analysis operators
https://community.qlik.com/t5/QlikView-Documents/Operator-in-Set-Analysis/ta-p/1479010
Hope this helps.
1,663 Views
