Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
gouthamkk
Creator
Creator

Set analysis Date selection issue

HI,

i have an expression as below

=Avg({$<Date ={">=$(=max([customerdate]))"}>}val)

when i am manually selecting the date from a list box (eg: 06/01/2016 to 06/30/2016), i am getting the correct average.

But when i am selecting from a calendar object(Same date range), i am getting a different average.

Calendar object variables are defined as below

startdate: ='>='& vStartDate

Enddate : ='>='& vStartDate & '<=' &vEndDate

Can some one please advise.

1 Solution

Accepted Solutions
gouthamkk
Creator
Creator
Author

Hi,

Got it fixed by replicating the date field and for calendar object and list box i used one date field and for Set Analysis Expression i used Replicated Date Field.

View solution in original post

7 Replies
sunny_talwar

Do you see the same selection made in the list box for date or do you see some oddity?

gouthamkk
Creator
Creator
Author

hi,

I did not follow the question but when i am selecting the date range from the calendar, i see same selection in the list box.

But when displaying values in a straight table when selecting a calendar object date range, i am seeing more values in the table

Hope i did not confuse

Clever_Anjos
Employee
Employee

Please try formatting you search expression

=Avg({$<Date ={">=$(=Date(max([customerdate])))"}>}val)

gouthamkk
Creator
Creator
Author

HI,

I did try. No change

Anonymous
Not applicable

Hi

I think ...

your  calendar objects over riding your date(max(..) function

startdate: ='>='& vStartDate

Enddate : ='>='& vStartDate & '<=' &vEndDate



gouthamkk
Creator
Creator
Author

hi I guess so,

I just added my qvw. What i am trying to do is with current set analysis expression, it is not changing with date selection.

But is there a way to change it if i made a selection.

eg: in current expression

variable customerdate has a value 5/30/2016

when no selections made the average is 1.7538103, which is correct.

But when i select dates from the list box from 06/01/2016 to 06/30/2016, i am still getting save value 1.7538103 instead of calculating the the average for the selection i made in this case i am suppose to get 1.7511041

Please Advise.

gouthamkk
Creator
Creator
Author

Hi,

Got it fixed by replicating the date field and for calendar object and list box i used one date field and for Set Analysis Expression i used Replicated Date Field.