19 Replies Latest reply: Oct 5, 2012 8:32 AM by Thomas Jensen RSS

    Previous Month

      Hello ppl!

       

      I have a question!

       

      Ived created a variable called vPreviousMonth =month(addmonths(max(Date_Clean),-1))

       

      I want a straight table which shows current month i have selected (ive made that) and then i want the previous table to show previous month

       

      e.g. If i am in November i also want to see October - If i am in July, i also want to see June..

       

      How do i make that expression?

       

      My expression for currentmonth looks like this:

      =Sum({<Month=, Year=,2012={'>=$(=MonthStart(Max(2012)))<=$(=Max(2012))'}>}BuyPriceRealized)

       

      I dont know if that expression is correct if not i would also like to know how the "right" way is to do it...

       

      Thanks ALOT!!