Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Seven7
Contributor II
Contributor II

null values in count

Hi,

I have this expression :

Count({$<condition1>+<condition2>} distinct(ID)

I want to add a condition based on 3 fields exemple phones(home,work,cell) ===> at less one of them is Not Null

how can i do it ?

1 Solution

Accepted Solutions
JuanGerardo
Partner - Specialist
Partner - Specialist

To add a condition to check for any not null value you can use the asterisk, like this:

Count({$<condition1 on StartDate>+<condition2 on EndDate> + PhoneNumber={"*"}} distinct(_ReferenceID)

PD.- I suposse the <> you are using are not different set expressions, just conditions in the same set, as different sets are delimited by <>.

JG

View solution in original post

3 Replies
JuanGerardo
Partner - Specialist
Partner - Specialist

Hi @Seven7 , you can try this:

Count({(<condition1> + <condition2>) * <phones = {'home', 'work', 'cell'}>} distinct ID)

 

JG

Seven7
Contributor II
Contributor II
Author

Tables :

Transaction (_ReferenceID, StartDate, EndDate)

CustomerPhones(_ReferenceID, CellPhone, HomePhone, BusinessPhone)

 

Count({$<condition1 on StartDate>+<condition2 on EndDate>} distinct(_ReferenceID)

this count work for me !, now i want to count only _ReferenceID who has at less one phone number NOT NULL ...

JuanGerardo
Partner - Specialist
Partner - Specialist

To add a condition to check for any not null value you can use the asterisk, like this:

Count({$<condition1 on StartDate>+<condition2 on EndDate> + PhoneNumber={"*"}} distinct(_ReferenceID)

PD.- I suposse the <> you are using are not different set expressions, just conditions in the same set, as different sets are delimited by <>.

JG