avg(cigarette_sales) shows the average per week for your current selection.
For 2012 you can use:
For 2011 you can use:
Might have missed a character here or there in my untested set anaysis
I have done that already, but this only plots one graph in the Line chart. i.e. when I select Year as 2011 in the Year list box, it plots for 2011. Similarly for 2012. So, I have 2 line graphs which are seperate. I want both the line graphs together in one single chart, may be one displaying in green, the other in red.
So, my X-Axis has Week numbers
Y Axis has the Sales figures
I should have 2 graphs plotted between these 2 axes for current year and previous year.
Hope this clarifies.
As told by Johannes, you will have to create two different expressions if you want to have two lines in your chart.
I have attached a sample file.
That might help you
Line Chart.qvw 160.0 K