4 Replies Latest reply: Jul 25, 2016 9:17 AM by Clever Anjos RSS

    Problem with calendar

    Markus König

      Hi,

      I have the following Code:

      Sales
      LOAD i_ticket,
           date(d_date,'DD.MM.YYYY') as d_date,
           Sale
        FROM
      [D:\QlikView\QVD\Tickets_DATA.qvd]
      (qvd);
      
      
      Concatenate
      Bonus:
      LOAD i_ticket,
           date(d_date,'DD.MM.YYYY') as d_date,
           Bonus
      FROM
      [D:\QlikView\QVD\Bonus_DATA.qvd]
      (qvd);
      
      
      
      
      

       

      and a calendar:

      //-----------------------------------------------------------------------------------------------------------------------------
      LET vMinBetDate = num('01.01.2016');
      LET vMaxBetDate = today()-1;
      
      
      TempCalendar_Betday: 
      LOAD 
                     $(vMinBetDate) + Iterno()-1                     as TempNum,
                     Date($(vMinBetDate) + IterNo() - 1)             as TempDate 
                     AutoGenerate 1 While $(vMinBetDate) + IterNo()-1 <= $(vMaxBetDate);
      
               
      Calendar_Betday: 
      Load 
                     date(TempDate,'DD.MM.YYYY')                            as d_date,
                     weekday(TempDate)                                    as Weekday, 
                     week(TempDate)                                         as Week, 
                     Year(TempDate)                                          as Year, 
                     Month(TempDate)                                       as Month, 
                     weekyear(TempDate)*100+week(TempDate)                 as YearCW,
                     year(TempDate)*100+month(TempDate)                     as YearMn,
                     num(month(TempDate))                                 as MonthNr
                        
      Resident TempCalendar_Betday
      Order By TempDate ASC; 
            
      drop table TempCalendar_Betday;
      
      ////-----------------------------------------------------------------------------------------------------------------------------
      
      
      

       

      My problem is if i select a Month or MonthNr I get only i get only data from table Sales.