Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
fabdulazeez
Partner - Creator III
Partner - Creator III

Set Analyisis Boundary for integer diemension

Sum({<EmployeeID={">3 <2"}>}[Sales Amount]) is giving me results for 0 and 1 

(Like invalid  range)

and Sum({<EmployeeID={">1 <3"}>}[Sales Amount])  gives result properly for 2.

Is this a expected behavior  as I was expecting a between

I am using February 2019 ReleaseEnterprise edition.

So i am using like Sum({<EmployeeID={">3"}*{"<2"}>}[Sales Amount])

Labels (1)
13 Replies
fabdulazeez
Partner - Creator III
Partner - Creator III
Author

Yeah that's what i thought as it was giving output for second condition.

Basically like second selection is excluded from first selection, first selection is removed and second selection is applied.

If it's like that than i need to be more vigilant while writing set Analysis.

tresesco
MVP
MVP

As if it's working as OR condition instead of AND. That is, when the range looks to be a improper/impossible one, it uses OR in place of AND, the technicality of this evaluation I am not aware of. I don't remember if the case was so in old version of qlik engine, however in some cases new qlik engine is designed in such a manner that it applies it's intelligence to handle ambiguous scenarios ( I read @hic post, don't just recollect it now where), the same might be happening here; qlik engine is being intelligent here - since AND logic is not valid, therefore it is using OR logic.

jonathandienst
Partner - Champion III
Partner - Champion III

I created  simple app;

LOAD * Inline
[
Cat, Val
1, 10
2, 20
3, 30
4, 40
5, 50
6, 60
];

And now I can see the OR behaviour. in a text box:

=Concat({<Cat = {"<=2 >=5"}>} Cat, ',')

give 1, 2, 5, 6

And this the same as an explicit OR:

=Concat({<Cat = {"<=2"}+{">=5"}>} Cat, ',')

You learn something every day...

 

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
hic
Former Employee
Former Employee

The format of the search string decides how the search is made. 

>900<1000 will find all values greater than 900 and less than 1000
<900>1000 will find all values less than 900 or greater than 1000

 

This is described on https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Text_search_and...

If you want a strict behaviour, you need to split it up into two different conditions, you like you already have done.

HIC