Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Select year in avg( statement Help

Hi,

I wonder if somebody can help me with this avg statment. I want to chose only DoneYear 2014 - 2016. But This dose not work. I Think its some misplaced brackets.

Any ideas?

This works

avg({$<DaysFromToDate={"<=$(=vMaxDaysFromToDate)"}>}DaysFromToDate)

but When I try to put in YEAR it fails  badly

avg({<DoneYear={'2013','2014','2015','2016'}>}{$<DaysFromToDate={"<=$(=vMaxDaysFromToDate)"}>}DaysFromToDate)

1 Solution

Accepted Solutions
sunny_talwar

Try this may be:

=Avg({<DoneYear={'2013','2014','2015','2016'}, DaysFromToDate={"<=$(=vMaxDaysFromToDate)"}>}DaysFromToDate)

View solution in original post

5 Replies
sunny_talwar

Try this may be:

=Avg({<DoneYear={'2013','2014','2015','2016'}, DaysFromToDate={"<=$(=vMaxDaysFromToDate)"}>}DaysFromToDate)

Not applicable
Author

No nothing sorry the chart is empty

Not applicable
Author

Thanks my bad your code worked like a charm.

Not applicable
Author

Hi Sunny,

Thanks for the help, can you describe what the function of the dollar sign Is in the expression I tried the help section in Qlik but cant understand it.

=Avg({<DoneYear={'2013','2014','2015','2016'}, DaysFromToDate={"<=$(=vMaxDaysFromToDate)"}>}DaysFromToDate)

sunny_talwar

I can try explaning it, but I feel that there are better resources out there. Check this link out: The Magic of Dollar Expansions