0 Replies Latest reply: Mar 17, 2016 6:50 AM by Łukasz Liziniewicz RSS

    calculating in script

    Łukasz Liziniewicz

      Hello,

      I have such DATA in my SOURCE:

       

      PARTNER NAME,

      PERIOD (QTR),

      REVENUES

       

      REVENUES are cumulated in the year (Q1 is revenue for Q1, Q2 is revenue for Q1 and Q2 ad so on)

      I need to calcuate REVENUES_QARTARLY for every single quarter - on script level.

       

      So generaly:

      if (Q1, REVENUES, REVENUES - PREVIOUS REVENUES)

       

      The trap I identified:

      1. When Partner appears first time in data:

        a) if he appeard in Q1 it is easy no calculations are necessery

        b) if he appeard in Q2 I need the average (REVENUES/QTR_NO)

       

      2. When there is a drop in data

        a) for period with the lack I don't want to see any REVENUES_QARTARLY

        b) for period after the lack I need the average (REVENUES/QTR_NO)

       

       

      Anny suggestions?,

      L