Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Average in Line Graph

Hello. I'm trying to add a line to my combo chart which represents an average by period. Very simple data model. The bars represent total value for the period. The line should represent days_avail (a weighted average). The line only appears as a dot. Can someone take a look? I tried adding the set expression from the value expression to the days_avail expression, but that doesn't seem to work.

Period is single select. If I change it to multi select and select all the periods, the days_avail line appears fine.

2 Replies
Anonymous
Not applicable
Author

Removing the aggr and adding set analysis like this :

=sum({<period={">=$(=Max(period)-1)<=$(=Max(period))"}>} value)

/ sum({<period={">=$(=Max(period)-1)<=$(=Max(period))"}>} total value)

* sum({<period={">=$(=Max(period)-1)<=$(=Max(period))"}>} days_avail)

Give you a line, but I not sure if it is what you actually are after.

Not applicable
Author

Thanks, but that doesn't work. The days_avail changes for a given period as different periods are selected...