# QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Contributor II

## Set analysis problem

Hi all,

consider this table:

`F1F21 10 2 20 3 30 4 40 5 50 6 60 7 70 8 80 9 90`

and this sum :

sum( {<F1={">=2<=3"}>} F2 )

result is 50. This means that the result is AND between >=2 and <=3.

Let's consider another expression:

sum( {<F1={">=9<=1"}>} F2 )

I expect 0 but very interestingly the result is 100 !!!! OR  between >=9 and <=1.

First question is: why QV acts in different ways in above examples?

Second: How can i constract a AND between >=9 and <=1in second example above?

( the sample QVW is attached.)

Best regards

Peyman

Tags (2)
1 Solution

Accepted Solutions
Valued Contributor

## Re: Set analysis problem

Hi Peyman

I also noticed this behaviour a couple of years ago, and we had some discussion about it here:

The solution is to write:

sum({<F1={">9"} * {"<=1"}>} F2)

Regards

G

4 Replies
Contributor II

## Re: Set analysis problem

i dont know why the table editor dosn't function!!!!

the table is as below:

F1     F2

1          10

2          20

3          30

4          40

5          50

6          60

7          70

8          80

9          90

Consider this expression :

sum( {<F1={">=2<=3"}>} F2 )

result is 50. This means that the result is AND between >=2 and <=3.

Let's consider another expression:

sum( {<F1={">=9<=1"}>} F2 )

I expect 0 but very interestingly the result is 100 !!!! OR  between >=9 and <=1.

First question is: why QV acts in different ways in above examples?

Second: How can i constract a AND between >=9 and <=1in second example above?

( the sample QVW is attached.)

Best regards

Peyman

Valued Contributor

## Re: Set analysis problem

Hi Peyman

I also noticed this behaviour a couple of years ago, and we had some discussion about it here:

The solution is to write:

sum({<F1={">9"} * {"<=1"}>} F2)

Regards

G

Contributor II

## Re: Set analysis problem

Hi GandalfGray,

thank you so much for your help .

Best regards

Peyman

Valued Contributor

You're welcome

GandalfGray