2 Replies Latest reply: Aug 13, 2013 12:10 PM by Stephen Daspit RSS

    Month-over-Month expression in straight table

      Hello. I am trying to create an expression that looks at month-over-month changes. This would be in a straight table. The month dimension of the chart is named [Ordered Month].

       

      Here is the current period expression:

       

      SUM([Running Day Count])/COUNT([Magnet Order ID])
      

       

       

      I have tried all sorts of set notation. I think I'm on the right track, because this expression quasi-works:

       

      SUM({<[Ordered Month] = {May}>} [Running Day Count])/(COUNT({<[Ordered Month] = {May}>} [Magnet Order ID]))
      

       

      Obviously, I am hard-coding May in the expression formula above. This works, but only for the row in my table for May. I want to generalize this formula to be the previous month for each month value in the dimension. Once I do that, I'll subtract this good formula from the basic sum()/count() expression to get the month-over-month delta.

       

      Unfortunately, I don't have an easy way to scrub out senstive data in order to post the .QVW here. I appreciate any help you can offer!

       

      Thanks!

       

      Message was edited by: sdseasd1 (formatting code chunks appropriately)