4 Replies Latest reply: Jul 24, 2012 8:51 AM by Goran Korsgren

# Set analysis problem

Hi all,

consider this table:

```F1
F2
1
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

• ###### 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

• ###### 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

• ###### Re: Set analysis problem

Hi GandalfGray,

thank you so much for your help .

Best regards

Peyman

• ###### Re: Set analysis problem

You're welcome

GandalfGray