Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
chanchalsharma
Contributor III
Contributor III

Getting absurd behavior of set analysis in Qlik sense

Hi All ,

I applying set analysis statement in qlik sense .

but it is giving me 0  value .

where as I have number in applied date range also I checked same statement in qlikview ,It is working perfectly .

Please verify below mentioned statement and correct me If I missed something.

SUM({<POHistoryDate={">=27/11/2015<=27/11/2015"}>}POHistoryCount)

sum({< POHistoryDate = {">=$(=vStartDate)<= $(=vEndDate)"} >}POHistoryCount)

Thanks in advanced

Chanchal

1 Solution

Accepted Solutions
chanchalsharma
Contributor III
Contributor III
Author

Hi All ,

I am really very thank full to all of you for your quick answers.


As understand my problem .

I am passing the Date value through Extension object ,in Set statement showing 27/11/2015 ,But it is not considering that value as date . When I tried this value to convert into the number it is showing me  : <.0012181367020077> instead of <42335 > .

So I got the actual reason of my problem and solve it through passing the value like '27/11/2015' instead of 27/11/2015 .

Thanks & Regards

Chanchal .

View solution in original post

5 Replies
tresesco
MVP
MVP

Try with single quotes like:

SUM({<POHistoryDate={'>=27/11/2015<=27/11/2015'}>}POHistoryCount)

Assuming the dates in your date field are of similar (i.e.-DD/MM/YYYY) format.

jagan
Luminary Alumni
Luminary Alumni

Hi,

The date format of POHistoryDate field and variables vStartDate and vEndDate should be in same format.  Then only below expression works.

sum({< POHistoryDate = {">=$(=vStartDate)<= $(=vEndDate)"} >}POHistoryCount)


Hope this helps you.


Regards,

Jagan.

Not applicable

Hi,

I just encountered same error, maybe you can try to use date() function:

sum({< POHistoryDate = {">=$(=date(vStartDate))<= $(=date(vEndDate))"} >}POHistoryCount)


Thanks and Regards.

reddy-s
Master II
Master II

Hi Sharma,

Even With out the = sign it should work fine.

Try this:

sum({< POHistoryDate = {">= $(vStartDate)<= $(vEndDate)"} >}POHistoryCount)

chanchalsharma
Contributor III
Contributor III
Author

Hi All ,

I am really very thank full to all of you for your quick answers.


As understand my problem .

I am passing the Date value through Extension object ,in Set statement showing 27/11/2015 ,But it is not considering that value as date . When I tried this value to convert into the number it is showing me  : <.0012181367020077> instead of <42335 > .

So I got the actual reason of my problem and solve it through passing the value like '27/11/2015' instead of 27/11/2015 .

Thanks & Regards

Chanchal .