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

Counting if .... is greater than AND...

Hi All,

Here's my data:

  

EmployeeCall TypePhone Number
JohnWork07100 123456
JohnPersonal07100 123456
JohnWork07999 654321
SarahWork07123 456789
SarahWork07456 567890
SarahPersonal07000 787878
JohnWork07100 123456

The end result will look like this:

Screen Shot 2017-10-09 at 21.32.25.png

So what I'm trying to calculate is:

show me the phone number that has been used for both work and personal calls (and only these numbers)

I tried something like this as the measure function in a bar chart count(call type = 'work'>0 AND call type = 'Personal'>0) - obviously this doesn't work - please can someone provide a formula to do this??

thanks,

Pokes

13 Replies
Anonymous
Not applicable
Author

Hi Damian,

Yeah it looks like a good solution, unfortunately its showing an 'error in expression' alert - any ideas?

cheers,

Pokes

Anonymous
Not applicable
Author

Damian,

I'm using the formula exactly as suggested by Stefan...

Count({<PhoneNumber = {"=Count(DISTINCT CallType)=2"}>} PhoneNumber)


not too familiar with set analysis so not sure how / what to amend.


cheers,


Pokes

swuehl
MVP
MVP

Double check that field names are spelled correctly (and take care of upper / lower case).

Not applicable
Author

Working
COUNT({<[Phone Number]={"=COUNT(DISTINCT([Call Type]))=2"}>}[Phone Number])

phone numbers.png