1 Reply Latest reply: Jul 23, 2012 8:24 AM by Stefan Wühl RSS

    Total Expression

    Yousef Amarneh

      Hi All,

       

      I am facing a problem, I need to calculate total of a specific measure regardless selections except Year and Month, that mean the total depend  on the time

      I used the following expression but it doesn't work

       

      Sum({1<Year=P(Year),Month=P(Month)>} Total Amount)

       

      Please it's urgent.

       

      Thanks,

      Yousef Amarneh

        • Re: Total Expression
          Stefan Wühl

          Would be helpful if you tell us what exactely doesn't work, i.e. what you get and what you expect.

           

          I assume if you select in a field connected to Year, but not in Year, you still get a filtering of the records because of the p() function, while you expect to see the total unfiltered.

           

          Try creating an alternate state (settings - document properties - alternate states), call it e.g. AS, then use

           

          =Sum({AS<Year=$::Year,Month=$::Month>} Total Amount)