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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Only count where this not that

Hi, This returns (count) 1 for Site when p Part_Number exist at a site but -p does not.  It returns 0 otherwise.  I would like to include an IF statement to ONLY return a value if p exists but -p does not.

Essentially, I am not interested in the 10,000 site_id_key where both items exist (Or p does not) - only the 25 where p exists but -p does not.

count({$<Site_Id_Key= p({$<Part_Number={'45133403129',
'45133403130',
'45133405029'
}>}
Site_Id_Key)
-
p({$<Part_Number={'1021931',
'8000826',
'45133308034',
'45133308530'
}>}
Site_Id_Key)>}Distinct Site_Id_Key

1 Solution

Accepted Solutions
sunny_talwar

See if this works:

=Count({<Site_Id_Key= p({<Part_Number={'45133403129', '45133403130', '45133405029'}>}Site_Id_Key) * e({<Part_Number={'1021931', '8000826', '45133308034', '45133308530'}>} Site_Id_Key)>}Distinct Site_Id_Key)

View solution in original post

3 Replies
sunny_talwar

See if this works:

=Count({<Site_Id_Key= p({<Part_Number={'45133403129', '45133403130', '45133405029'}>}Site_Id_Key) * e({<Part_Number={'1021931', '8000826', '45133308034', '45133308530'}>} Site_Id_Key)>}Distinct Site_Id_Key)

Anonymous
Not applicable
Author

Bingo, thank you.  Looking for a job?

sunny_talwar

Hahahaha no, not right now, but may be in the future