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

Selecting Multiple criteria on same field in Set Expressions

Hi Everyone

I am trying to get 2 different subsets of data off of the same field and need help with the logic within the set expression

What I am Wanting to get is

Column A = 1  and Column B = 2, 3, or 4  OR Column A = 2

Currently the set expression can give me Column A = 1 or 2 and Column B = 2,3,or 4,  but I want data for Column A= 2 and Column B = 1,2,3,4,5,6

count( {< ColumnA = {"1","2"}, ColumnB = {"2","3","4"}>} distinct ColumnC)

1 Solution

Accepted Solutions
sunny_talwar

Or this

Count(DISTINCT {<ColumnA = {1}, ColumnB = {2, 3, 4}>+<ColumnA = {2}, ColumnB = {1, 2, 3, 4, 5, 6}>} ColumnC)

View solution in original post

2 Replies
sunny_talwar

May be this

Count(DISTINCT {<ColumnA = {1}, ColumnB = {2, 3, 4}>+<ColumnA = {2}>} ColumnC)

sunny_talwar

Or this

Count(DISTINCT {<ColumnA = {1}, ColumnB = {2, 3, 4}>+<ColumnA = {2}, ColumnB = {1, 2, 3, 4, 5, 6}>} ColumnC)