Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
nasjw3255
New Contributor II

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

Re: Selecting Multiple criteria on same field in Set Expressions

Or this

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

2 Replies

Re: Selecting Multiple criteria on same field in Set Expressions

May be this

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

Re: Selecting Multiple criteria on same field in Set Expressions

Or this

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