Data preparation is as follows:
SalesData:LOADNum(ID) as ID,Date(Date) as Date,Month,Num(Year) as Year,Num(Sales) as SalesInline [ID, Date, Month, Year, Sales1, 2012-1-1, 1, 2012, 202, 2012-1-1, 2, 2012, 213, 2012-1-1, 3, 2012, 234, 2013-1-1, 1, 2013, 345, 2013-2-1, 2, 2013, 356, 2013-3-1, 3, 2013, 467, 2014-1-1, 1, 2014, 278, 2014-2-1, 2, 2014, 309, 2014-3-1, 3, 2014, 49];
Name the new line chart "sales ,,
Use month as the dimension ,:
Create two new expressions in the expression tab as follows:
The expression of actualsales is as follows:
=Sum({$<Year={'$(=Max(Year))'}>}Sales)
The pcpsales expression is as follows:
=Sum({$<Year={'$(=Max(Year)-1)'}>}Sales)
Click OK to generate a table, as shown in the following figure:
If you have any questions, please leave a message.
Several more topics will be written recently ::
1. display the sales data for the first 12 months of the selected time;
2. display the sales of the previous sales level;
3. Calculate the sales data for the last year.
Qlikview chart displays year-on-year data