9 Replies Latest reply: Nov 7, 2015 12:06 PM by camiel van der werf RSS

    how can i show the %difference of 2 months if this month sales..?

    camiel van der werf

      hello guys,

       

      i have the next question:

       

      i have this information:

         

      sales
      cars
      monthtoyotavolvocitroenpeugeot
      may5764
      june7931
      july91203
      aug151117

       

      and i want a barchart by car with the % difference between the second last month (july) and the third last month (june). But i only want to see the cars where the sales of the second last month are higher then 5 and the sales of the third last month are higher then 5. So i don't want to see citroen and peugeot.

      I tried it with this formula in the measurement and cars dimension:                                                                                                                                                                  

       

       

      If(sum({$<MONTH={"$(=max({1} MONTH)-1)"}>}SALES)>5 and

      sum({$<MONTH={"$(=max({1} MONTH)-1)"}>}SALES)>5 ,

      (Sum({$<MONTH={"$(=max({1} MONTH)-1)"}>}SALES)-

      Sum({$<MONTH={"$(=max({1} MONTH)-2)"}>}SALES))/

       

      Sum({$<MONTH={"$(=max({1} MONTH)-2)"}>}SALES)

        But it's not working, what i'm a doing wrong? i hope somebody can help.

       

       

       

      greetings,

      camiel