2 Replies Latest reply: Mar 4, 2017 10:41 PM by Rodrigo Jaime Rodriguez RSS

    Set Analysis for Previous Month

    Rodrigo Jaime Rodriguez

      Hello, Fellow Experts.

       

      I know this has already been asked and below are the references:

       

      * https://community.qlik.com/thread/222779?q=Set%20Analysis%20for%20Previous%20Month

      * http://aftersync.com/blog/the-magic-of-set-analysis-point-in-time-reporting

      * Set Analysis Wizard for QlikView | qlikblog.at

       

      But it seems my formula for getting the SUM from the previous month is not working:

       

      TRY 1:

      SUM(

      {$<[date.autoCalendar.YearMonth] = {"1<[date.autoCalendar.YearMonth] = {'=$(MAX([date.autoCalendar.YearMonth]) - 1)'}, [date.autoCalendar.YearMonth] = >"}, [date.autoCalendar.YearMonth] = >}

      utilization_den)

       

      TRY 2:

      var_NumeralDate = =((Year(date) - 1) * 12) + Num(Month(date))

       

      SUM(

      {$<var_NumeralDate = {"1<var_NumeralDate = {'=$(MAX(var_NumeralDate) - 1)'}, var_NumeralDate = >"}, var_NumeralDate = >}

      utilization_den)

       

      It seems these formula works but still shows zero.

       

      I may need your help if there might be problem with my syntax or something.