8 Replies Latest reply: Jul 6, 2017 1:36 PM by Mouna Chandra Konidhina RSS

    Table, current vs previous month columns.

    Marco Barroso

      I have a table and I am trying to get the current vs previous month volume numbers side by side. I am getting "0"' for the Prior month measure. I am not sure what I am doing wrong..

       

      [ProductionDate.Calendar.YearMonth], [Volume] , [Previous Month Volume]

      2016-Jan, 121, 0

      2016-Feb, 132,0

       

      [Previous Month Volume]:

       

      SUM( { $<

        [ProductionDate.Calendar.Year]    = { $(=Year (addmonths(ProductionDate,-1))) } ,

        [ProductionDate.Calendar.Month]     = { $(=Month(addmonths(ProductionDate,-1))) }

              >} Volume )

       

      Attached is the sample .qvf

       

      Regards