6 Replies Latest reply on May 3, 2018 6:01 PM by Shinichiro Murakami

    Totals over year calculated measure

    Cecilia Saldaña

      Hello,

       

      I have the following case where I need to

      1 Display expenses

      2 Display Las Year expenses side by side

      3 Display totals for both columns

       

      Problem 1

      Some last year expenses can be blank cells, so I generated a calculated measure instead

      Last Year =ZN(lookup(lookup(SUM([Gasto]),-1),0))

      This calc measure puts a zero if there is a blank and also gets the last year amount (but,,, the Total Column displays only zeros...)

       

      Captura de pantalla 2018-05-02 a la(s) 18.05.14.png

       

      Problem 2

      I defined the year filter as follows:

      STR(lookup(attr([Ejercicio]),0))

       

      This is so I can filter Ejercicio (year) and still be able to see "Last Year" data side by side to the selected year... but... I also see the Total column adding the "hidden" years...

       

      So, I need to see each Years corresponding last year column,,, while only adding visible columns in the Totals to the right.

       

      Any ideas on how to manage these two cases simultaneously (in the same table).

       

      Thank you,