Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis - Numeric Range

I cannot see the error in my syntax.  Can anyone else?

This works and gives me the sum of 'GL_Value' for 'GL_Account_Number's greater than or equal to 9000:

sum({$<GL_Account_Number ={">=9000 " }>} GL_Value )

This works and gives me the sum of 'GL_Value' for 'GL_Account_Number's less than 9200:

sum({$<GL_Account_Number ={"<9200 " }>} GL_Value )

BUT this does not work.  It gives me ALL the GL_Account_Numbers, not just 9000 to 9199.

sum({$<GL_Account_Number ={">=9000 <9200" }>} GL_Value )


I want the intersection set, not the union. All the documentation I find has this as the correct syntax but it is not working for me.

1 Solution

Accepted Solutions
Not applicable
Author

I solved my problem.  It is not evident in the documentation or in the reference material people have produced.

If you put a space between the start and end points, it won't work.

Note the space between >=9000 and <9200

sum({$<GL_Account_Number ={">=9000 <9200" }>} GL_Value )


Leave NO space and this works as advertised

sum({$<GL_Account_Number ={">=9000<9200" }>} GL_Value )

View solution in original post

6 Replies
Gysbert_Wassenaar

Can you post a qlikview document that demonstrates the problem?

And maybe this works:

sum({$<GL_Account_Number ={"=GL_Account_Number>=9000 AND GL_Account_Number<9200" }>} GL_Value )


talk is cheap, supply exceeds demand
sunny_talwar

Give this a try:

Sum({$<GL_Account_Number ={"=Num(GL_Account_Number) >= 9000 and Num(GL_Account_Number) < 9200 "}>}GL_Value)

Not applicable
Author

I solved my problem.  It is not evident in the documentation or in the reference material people have produced.

If you put a space between the start and end points, it won't work.

Note the space between >=9000 and <9200

sum({$<GL_Account_Number ={">=9000 <9200" }>} GL_Value )


Leave NO space and this works as advertised

sum({$<GL_Account_Number ={">=9000<9200" }>} GL_Value )

sunny_talwar

I don't think that this should be case, I tested this on one of the applications I am working on and it seems to work with a space between the two.

But whatever may be the case, you were able to get a fix which is more important.

Best,

Sunny

Not applicable
Author

I agree, usually spaces are not critical in QV syntax and Set Analysis but not in this case.

I can see it change before my eyes just by putting a space between and clicking on Apply.

This is Qlikview 11.20.12742.0 SR10 64 bit

sunny_talwar

I am using Qlikview 11.20.12852.0 SR11 version of QlikView and its working. PFA a sample.

Best,

Sunny