Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Year over Year line chart - Daily Data

Please see the attached file. I want to show a year over year line chart based on daily data or 7 day moving average.  Currently 2010 and 2011 data points are showing up continuously on the X-axis.  Instead, i would like to display 2011 data on top of 2010.

Hope it makes sense. 

Thanks.

1 Solution

Accepted Solutions
Not applicable
Author

You need to map your dates to Day # in FY (i prefer to use business days and combine sat and sundays but this is an example)  Then use Day # in Year as your chart dimensino so 1/1/10 will be on same axes point as 1/1/11

DateDay # in Year
1/1/20101
1/2/20102
1/3/20103
1/4/20104
1/5/20105
1/1/20111
1/2/20112
1/3/20113
1/4/20114
1/5/20115

View solution in original post

6 Replies
Not applicable
Author

Hi Deepkohlitvna ,

May be you have to change your expressions or you have to change your dimension into a calculated dimension for separate years , Try to change your expressions from if conditions to set-analysis coding year(date)='2010' and similarly for year 2011.

the lines are continuing because of not using any year limitation for specified year in your expression and continution of dates in the dimension from 2010 to 2011 .

hope it helps

thanks

Meher

Not applicable
Author

Doesn't seem to work.  Can't get 2011 to overlap 2010.

Not applicable
Author

You need to map your dates to Day # in FY (i prefer to use business days and combine sat and sundays but this is an example)  Then use Day # in Year as your chart dimensino so 1/1/10 will be on same axes point as 1/1/11

DateDay # in Year
1/1/20101
1/2/20102
1/3/20103
1/4/20104
1/5/20105
1/1/20111
1/2/20112
1/3/20113
1/4/20114
1/5/20115
Not applicable
Author

I think I am missing something here.  When I use Day # in Year, my X-axis now shows Days from 1 till 365 but the data on the line chart is the sum of 2010 and 2011 instead of separate lines, eventhough I am using separate expressions for 2010 and 2011. 

Not applicable
Author

this is the code use for my daily average charts.  I create one expression for each period.  In my case this is quarters and the axes is Day# in FQ comparing current qtr to last qtr and same qtr last year.

rangeavg

( above( sum({$<NumFYQTR={$(=Max(NumFYQTR,2))},[Subscription Indicator]={'$(=vProdorSub)'},[Vert-Horz]={"Vertical"},[Sales Type] = {"Commercial"},[WWS Sub Geo] = {"North America"}>} [TOTAL BOOKED ($)]), 0, RowNo()) )

Not applicable
Author

Thanks debbiepy.  It worked.