Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

gouthamkk
Contributor

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
Contributor

Re: Set analysis Date selection issue

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.

7 Replies

Re: Set analysis Date selection issue

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

gouthamkk
Contributor

Re: Set analysis Date selection issue

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

Employee
Employee

Re: Set analysis Date selection issue

Please try formatting you search expression

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

gouthamkk
Contributor

Re: Set analysis Date selection issue

HI,

I did try. No change

galax_allu
Valued Contributor

Re: Set analysis Date selection issue

Hi

I think ...

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

startdate: ='>='& vStartDate

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



gouthamkk
Contributor

Re: Set analysis Date selection issue

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
Contributor

Re: Set analysis Date selection issue

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.

Community Browser