Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Become an analytics expert with Qlik's new 15 week course: Applied Data Analytics using Qlik Sense. READ MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
7UL13N
Contributor
Contributor

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!

3 Replies
dilipranjith
Partner
Partner

change it to this
textCount(distinct {<Doc_ID-={'n/a', 'tbd'}>} Doc_ID)
Channa
Specialist III
Specialist III

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
nagaiank
Specialist III
Specialist III

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.