3 Replies Latest reply on Apr 10, 2018 1:55 PM by Deepak Rai

    Non-table calc solution to % change from previous month

    Vincent Baumel

      Hi friends-

       

      I need a % change from previous month, and it needs to NOT be a table calc. The user wants to be able to use this value in several different places, so a table calc doesn't really suit my needs.  I've got two existing calculations to establish my values:

       

      previous_month

      IF MONTH(MAX([date field])) = MONTH(NOW())-1 THEN [value] END

       

      current_month

      IF MONTH(MAX([date field])) = MONTH(NOW()) THEN [value] END

       

      At this point I try to build a % difference calculation like this:

       

      percent_change

      IF MONTH(MAX([date field])) = MONTH(NOW()) THEN ([current_month]-[previous_month])/[previous_month END

       

       

      Here's where things don't quite go right. The IF statement does evaluate as true for the current month only (which is good), but the value itself won't pull through. My arithmetic is right, and the first two calculations are right, so what am I missing? Any ideas?

       

       

      Thanks,

       

      Vince