2 Replies Latest reply: Dec 16, 2015 12:43 PM by Gysbert Wassenaar RSS

    CALCULATED COLUMN

    Rico Alejandro

      Hello,

       

      I have a pivot table with Years in "columns", "Countries" in rows and "Amount" as Measure.

       

      We need to create a column between every element of dimension (Year) with the variation between 2016 with 2015, 2015 with 2014, 2014 with 2013...

       

      Attach a image.

       

      Can anyone help me?

       

      Thank you in advance

       

      qlik2.jpg

        • Re: CALCULATED COLUMN
          Adam Krepistman

          I would suggest something along the lines of having each year as an expression such as

          year(today()) = 2015

          year(today()) +1= 2016

          year (today()) - 1 = 2014

          year (today()) - 2 = 2013

          etc.

           

          and so forth depeneing how far you want to go back - this will allow the oldest year to roll off

          you would also then create an expressions where you would subtract

          year(today() - year(today()-1) using set analysis

          you would then add your variation expression inbetween the year expressions

          • Re: CALCULATED COLUMN
            Gysbert Wassenaar

            You can almost get what you want by using two expressions

            1. Sum(Amount)

            2. Sum(Amount)-Before(Sum(Amount)