15 Replies Latest reply: Jun 16, 2015 4:08 PM by Sunny Talwar RSS

    Set Analysis Date Filter (Qlik Sense)

      I need help with this issue I'm having.


      First off all lets talk about my data

      this are my formats

      SET TimeFormat='hh:mm:ss TT';

      SET DateFormat='DD/MM/YYYY';

      SET TimestampFormat='DD/MM/YYYY hh:mm:ss[.fff] TT';


      I declare this variables

      SET vAnioActual=YEAR(NOW());

      SET vAnioAnt=YEAR(NOW())-1;

      SET vMesActual=MONTH(Today());

      SET vFechaHoy=Now();

      SET vFechaAnioAtras = Date#(Now()-365,'DDMMYYYY');


      When I bring my data this are my fields that brings date data

      LOAD Documento,


          Date#(Fecha,'DDMMYYYY') As FechaNum,

          YEAR(Fecha) As Anio,

          MONTH(Fecha) As Mes,



      Where Fecha is my field containing dates in dd/mm/yyyy format

      I've been trying to get info of my sales (TotalSales) From the last 12 months from now, I've been trying using, variables, a constant and formulas, but not working at all.    I Attached my App.   Please help


      Thanks in advance