15 Replies Latest reply: Jul 27, 2017 10:53 AM by Sunny Talwar RSS

    Set analysis with autoCalendar

    Jose Alberto Sanchez Nieto

      Hi, I have a autoCalendar was automatically generated from a date field in my fact table "fecha_inicial", I created a filter panel with the following statement:

      [fecha_inicial.autoCalendar.Year], in the selected one year and I want in a Kpi show me the sales of the year prior to the selected in the filter panel. For that:

      Sum ({$ <[fecha_inicial.autoCalendar.Year = {$ (= Max ([fecha_inicial.autoCalendar.Year]) - 1)}>} sales)

      This statement does not work, however if I replace the field generated in autoCalendar "fecha_inicial" with an integer database field that only contains the year: 2017, 2016 etc, it works correctly, the problem comes from using fecha_inicial.autoCalendar.Year, which can be the reason?.

      The autoCalendar line that was generated automatically is:.


      DECLARE FIELD DEFINITION Tagged ('$ date')


      Dual (Year ($1), YearStart ($1)) AS [Year] Tagged ('$ axis', '$ year')


      Tested on the latest version: Jun 2017


      Thanks and regards.