4 Replies Latest reply on Nov 24, 2015 2:20 PM by Thomas Dodds

    How to get 4 Months sales data

    2885278

      Hello Guys

       

      I have table Sales

       

      Time by Month    Branch     Sales

      201501                10           100

      201502                10           20

      201503                10           90

      201504               10            90

       

      Acually i have found this formula Time.Date <= cast(current_date as date) and Time.Date >= TIMESTAMPADD(SQL_TSI_MONTH, -3, TIMESTAMPADD( SQL_TSI_DAY , DAYOFMONTH( CURRENT_DATE) * -(1) + 1, CURRENT_DATE))

      my question: is it working to use DATE, in fact my time dimension is Time By Month? can CURRENT_DATE be replaced with @{pvMonth}{2015-05}.