5 Replies Latest reply: May 11, 2017 9:18 AM by Martín Caruso RSS

    Get quarter value through accumulated value

    Martín Caruso

      Hello community, how are you?

      The following problem occurred to me. I have a base for each quarter, which I am concatenating as they are loaded until a single table remains.

      The totals of each quarterly amount are accumulated so that in order to obtain the value of the amount for that quarter I must calculate it.

      To do this assemble the following table, so that my need can be understood.


      YEAR - QUARTERTOTAL VALUEVALUE QUARTEREXPRESSION
      20150324002400201503
      20150453002900201504 - 201503
      20160179002600201601 - 201504
      201602110003100201602 - 201601

       

      In the first column is the period that specifies the YEAR and the QUARTER. In the second column, the value of the accumulated amount for each quarter. Here I make a couple of clarifications: when the quarter is 2 (for example, 201602) the accumulated is also the annual accumulated. The other point to note is that the first quarter, that is, the quarter that only accumulates "its" quarter is 3 (for example, 201503). The remaining two columns represent the value that should be the amount of each quarter and how it is calculated.

       

      The indicators that I must develop must show the amounts of the current and (and selected) quarter and the previous quarter and year. For this, I have on the dashboard a selector of YEAR and a QUARTER.

       

      The expression I am using, is the following but I am given 0.

       

      = sum(DIM_TOTAL_VALUE) -

      sum({$ < DIM_YEAR={$(=DIM_YEAR_PREV)}, DIM_QUARTER={$(=DIM_QUARTER_PREV)} > } DIM_TOTAL_VALUE)


      Does anyone have any idea how to replicate the table I need?

       

      I appreciate the help you can give me.

       

      Regards!