I have a bar chart with two dimensions(Area and Year), and one expression Avg(Attainment).I need to one more bar for each Area , which will show the Avg(Attainment) over years in that area.Please refer to the attachment.I am looking for something exactly like this.Any help is greatly appreciated.
(In my qlikview object I have used bar offset and reference line to get the bars above and below 100%.)
I have found that with adding an average line to my line charts I need to overlay a second "transparent" line chart over top. This will work for your bar chart as well but it is not ideal. If anyone has a better method I would also be interested.
a much easier way would be to add a reference line into your bar chart. Go to the 'Presentation' tab and click on 'Add' in the 'Reference Line' field (bottom right). Here you can key in your expression for your average and also a label to this line. See the example below:
I am facing one problem while I implemented this approach.I have multibox for 'Area'(with dropdown as available Area's) in my application.Whenever I select an Area from dropdown in multibox...which does not have data for all the 3 years(say the selected area has attainment data just for 2013(and not for 2011 and 2012)), the entire graph blanks out showing "No data to Display", wherein I would like it to show two bars, one for 2013 and one for Avg(which will eventually be same as 2013).Any idea what can be done to resolve this?
I already used rangeavg and unchecked supress missing, but it was not working.But then I added else clause as '0'.As in if there is no data for a given year, then the bar should have '0' as value.This solved my issue.I think the issue was because I was getting null and not zero, and hence graphs were somehow getting supressed.