1 Reply Latest reply: Jan 19, 2011 11:13 AM by Jonathan Dienst RSS

    Sum function text and fields

    Gareth Joubert

      Hi

      Please can you help me with the below expression:

      = Sum ( {$<STTR_STATUS = {50, 99}, OrderType = {20}, FY= {"F"& Right(text(CURRENTYEAR),4)} >} OrderValue)

      The formula below works for the current year however I can not get it to work for last year as above.

      = Sum ( {$<STTR_STATUS = {50, 99}, OrderType = {20}, FY= {$(CURRENTYEAR)} >} OrderValue)

      CURRENTYEAR is a variable defined in the script.

      I have tried several variations of the above code without sucess. Any suggestions would be appreciated.

      Thanks, Gareth

       

        • Sum function text and fields
          Jonathan Dienst

          Gareth

          How about defining a variable called PRIORYEAR at the same point as CURRENTYEAR, but one yeat before?

          (Not sure how your first expression would produce data for the prior year, but the string calculation should be enclosed in $(=...), ie:

          FY= {"$(='F'& Right(text(CURRENTYEAR),4))"}

          Jonathan