4 Replies Latest reply: Dec 10, 2012 11:50 AM by Jaromír Frais RSS

    Chart formula

      Hi,

      could you pls advice me a formula for a chart in actual month.

      I have dimensions - year,month. Than i have 4 expressions(sales) and i need to create a pie chart for actual period. A pie chart will concist 4 expressions = 100%. There must be a formula,that should say - for all 4 expressions take only sales in actual month (something like MAX month)

       

      Could you tell me how i could do it

      Thx

      Jerry

        • Re: Chart formula
          Gysbert Wassenaar

          You should be able to use set analysis expressions. To get the sum of Sales of the last month try:

          sum({<Year={$(=max(Year))},Month={"$(=max({<Year={$(=max(Year))}>}Month))"} >} Sales)

           

          Months can be troublesome because they can have a textual and a numeric value. If you have such a Month field you may need this instead:

          sum({<Year={$(=max(Year))},Month={"=num(Month)=$(=max({<Year={$(=max(Year))}>}Month))"} >} Sales)