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: 
richard_chilvers
Specialist
Specialist

set analysis not equal

There are a number of discussion on this forum about this topic. I have tried to follow these to do a COUNT based on all values where the field called OBAC_Status is not equal to 'Duplicates'.

It works fine if I use

count( distinct Telephone) - count({ <OBAC_Status={'Duplicates'}>} distinct Telephone)

but not:

count({ <OBAC_Status={'*'}-{'Duplicates'}>} distinct Telephone)

What is the difference please ?

7 Replies
sunny_talwar

I think the first expression is including any blank OBAC_STATUS, where as the second one is excluding blank and Duplicates

sunny_talwar

Have a look at the attached sample to get a better understanding.

richard_chilvers
Specialist
Specialist
Author

Thanks - but I don't think this is the answer. There should be no blanks. If there are, the number will be small, but the difference in the 2 different expressions is large.

sunny_talwar

Okay. Can you share a sample? It is hard to say what it could be, without seeing what you have.

swuehl
MVP
MVP

If the same telephone number could have several status, e.g

+00 12345678 Duplicates

+00 12345678 Main

your two expressions are fundamental different.

First one will return zero for above sample, second will return 1.

richard_chilvers
Specialist
Specialist
Author

Hi

Yes - that is very possible. I will explore and see whether I can better understand my data and what the 2 solutions do !

Thanks

effinty2112
Master
Master

Hi Richard,

count({ <OBAC_Status={'*'}-{'Duplicates'}>} distinct Telephone)

will count distinct Telephone disregarding any selections made in the field OBAC_Status except where equal to 'Duplicates'.

This can be written more simply as

count({ <OBAC_Status=-{'Duplicates'}>} distinct Telephone)

compare with

count({ <OBAC_Status-={'Duplicates'}>} distinct Telephone)

will count distinct Telephone in the currently selected records except where equal to 'Duplicates'.