# New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for
Did you mean:
Highlighted
Not applicable

## How make filter sum of two attributes?

Hi,

For instance, I have table shown like below:

Month     1Order  2Order

Jan           1           0

Feb           2           0

March       1            1

Aug           2            1

I want filter three different filter for three expression.

expression 1:  [1Order] + [2Order] = 1

expression 2:  [1Order] + [2Order] => 2  and  [1Order] + [2Order] <=4

expression 3:  [1Order] + [2Order] > 4

I tried in the expression for expression 1 Sum({\$< [1Order] + [2Order] ={'1'}>} ([1Order] + [2Order]))  but it doesn't not work.

I have solution in the data model  [1Order] + [2Order] as 3Order

then expression would be Sum({\$< [3Order] ={'1'}>} [3Order])

My aim want to do this in set expression.

Best,

Robert

1 Solution

Accepted Solutions
Highlighted
Master III

Sum(If( [1Order] + [2Order] =1, ([1Order] + [2Order]))

8 Replies
Highlighted
MVP

Highlighted
Not applicable

Hi,

My original data like this below and my dimension is month.

Month              phone    1Order  2Order

Jan-2013           956              1           0

Feb -2013          456             2            0

March-2014       989             1            1

Aug -2014         765              2            1

Indeed, i have data since march-2013 till today.

Best,

Robert

Highlighted
Master III

Sum(If( [1Order] + [2Order] =1, ([1Order] + [2Order]))

Highlighted
Not applicable

Thanks ...

Highlighted
Not applicable

My solution would be:

Sum(If( [1Order] + [2Order] =1, ([1Order] + [2Order]))

Sum(If( [1Order] + [2Order] =>2 and [1Order] + [2Order] <=4, ([1Order] + [2Order]))

Sum(If( [1Order] + [2Order] >4, ([1Order] + [2Order]))

Highlighted
MVP

Your question was, you want to get this in SET EXPRESSION !

Highlighted
Not applicable

Yes. My aim want to be do in the expression not in the data model.

Highlighted
MVP

My understanding was you want as Set Analysis and not using IF... But any how, you got your required answer...

Cheers !