3 Replies Latest reply: May 14, 2012 4:13 PM by Jose Tos RSS

    expression issue

    Jose Tos

      Hi,

       

      I need help with this expression:

       

      sum({$<NumPeriodo={'<=$(NumPeriodo)'},%KeyPeriodo={"=%KeyPeriodo"}>}Promedio)

       

      I thought that this would work but is wrong. First of all, I have this fields:

       

      NumPeriodo: Period`s number, being 01 for August and 11 for July.

       

      PERIODO: Is compossed by Year+NumPeriodo, for example August 2010 would be 201001

       

      %KeyPeriodo: This is an ID to identify the periods so 1 identify the periods of 2010(August2010 to July2011), 2 = (Aug2011 - July2012) , etc.

       

      When the user selects a PERIODO, for example 201107 (Year 2011, NumPeriodo 07) I need to add all the values of Promedio since NumPeriodo=01 to NumPeriodo = 07. The %KeyPeriodo would be 2 for all that periods.

       

      Help me, please.

       

      Thank's,

      Chema

        • expression issue
          Jose Tos

          I'm a little desperate. Why if I create a textObject and I write =NumPeriodo, I get 07 which type is a Number and when I write the next expressions the result is different??

           

          sum({$<NumPeriodo={"<=07"}>}Promedio)  ----> Working fine!

           

          sum({$<NumPeriodo={"<=NumPeriodo"}>}Promedio)  ----> Working wrong!

           

          Could someone explain to me?Any clue?