1 Reply Latest reply: Aug 21, 2010 3:41 PM by adiasavaid RSS

    Dynamic Calculation of Previous Year Data



      I am very new to Qlikview - only 2 days so please excuse a simple question....







      I have a column in the pivot table which displays the sales of the Year that was selected. E.g. if the Selection is for Year 2008, it displays data for the Sales for Year 2008 correctly using the SelYear formula: sum



      However, I have another column in which I want to display the previous year's data of the Year selected. E.g. If the Selected Year is 2008 then I want to display the Sales data for Year 2007 in the second colmn called PrevYear.

      ({$<Year=(Year)>}Sales)/ 1000

      The formula for PrevYear that I am using is: sum({$<Year=(Year-1)>}Sales)/1000 which does not give me the correct results for sales of 2007. It gives me the same value as in the first column which is the Sales for Year 2008.

      Can somebody please help me.