6 Replies Latest reply on Jul 1, 2016 5:49 AM by Amit Ray

    Dynamic value storing

    Amit Ray


      This is my first post here. I am new in tableau with experience in other BI tool. I am finding a way of storing a calculated (aggregated) value in an object which can be referred in another expression. I am trying to create a line chart with two lines Current Year MTD and Last Year MTD. Now last year expression has Lookup(). For Current Year MTD, say if my date starts from 15th of this month, my Lat Year MTD should similarly starts from 15th of the month last year. But, since Lookup() refers the -12 th of data point it actually picks the entire month of last year. I need to fix this issue. I am trying to write an expression for lat year MTD something like:


      If rank(index())=1 then <calculate LYMTD>





      Now this '<calculate LYMTD>' is desired to be an aggregated value. Hope I could explain to give you an idea about what I need. If not please let me know for further clarifications.


      Thanks for your kind help.