2 Replies Latest reply: Jun 28, 2012 12:06 PM by ljohnson1974 RSS

    Daily Year over Year Growth

      Hi all --


      Apparently my brain hasn't been functioning well lately, but I'm having a problem with a year over year growth calculation at a daily level.  I'm doing a transaction count by day in a selected time frame and need to calculate the transaction count growth by day.  I've tried using set analysis to get the transaction count for the same Transaction Date a year ago by using [Transaction Date] = {$(=AddMonths([Transaction Date],-12))} but that just returns 0, however if I set the year in set analysis = Year-1 then I get two sets of rows in the table, one for the select year and one for the prior year. 


      Example output should be:

      Date# of Transactions CY# of Transactions PYGrowth



      Any suggestions or ideas what I'm doing wrong?  I've been staring at it for 2 days and nothing is sinking in.



      Leigh Johnson

        • Re: Daily Year over Year Growth
          Stefan Wühl

          You should be able to see your set expression with the expanded dollar sign expansion when not using a label in your expression (i.e. the expression will be used as label). Then hover over the label and look at your set expresssion.


          What does

          =AddMonths([Transaction Date],-12)


          returns in a text box?


          Your set expression is evaluated in global context, not in the context of the dimension value. So if you are using Transaction Date as dimension, the current dimension value will not be used within your expression set expression.