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: 
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