4 Replies Latest reply: Apr 20, 2016 3:44 PM by ANDY SALLEE RSS

    Master Calendar issue

    ANDY SALLEE

      Good day, working on some new development and having problem understanding why Master Calendar is not working.

       

      Original field load is date time stamp, loading this as is along with additionally load date and time only.

       

      Creating master calendar to the date only load and this creates fine and links fine however when I select this date out of the master calendar I get no results on simple sum of quantity.

       

      sample data of qvf attached.

       

      I appreciate any assistance.

        • Re: Master Calendar issue
          Stefan Wühl

          Your TicketDateNum is a Timestamp, with date and time part.

           

          If you then create your master calendar, most of the timestamps won't match with your calendar values.

           

          2016-04-20 20_09_06-Qlik Sense Desktop.png

           

          Take care to create a Datefield with only date part:

           

          [TicketTable]:

          LOAD [TicketId],

            [HaulerId],

              [TicketDate],

            [TicketDateTime],

            Floor([TicketDateNum]) as [TickerDateNum],

            [WaterTypeId],

            [OperatorId],

            [Quantity],

            [DisposalId],

            [TicketNo],

            [DeliveryType]

          FROM [lib://FolderQVD (bosque_asallee)/TicketTable.QVD] 

          (qvd) Where TicketDateNum >= '$(vMonthStart)' and TicketDate < '$(vToday)';

           

          Also check your other date fields if they have a numeric representation as requested (i.e. integer values for date fields, floating point for timestamps / time values).

           

          Why don’t my dates work?

            • Re: Master Calendar issue
              ANDY SALLEE

              Hmm that is strange, here is how I am loading the QVD directly from the database, do I need to convert to date when I run the load from this QVD file also you think?

               

              TicketTable:

              LOAD TicketId,

                  HaulerId,

                  TicketDate, (original date time field)

                  Time(TicketDate) as TicketDateTime,

                  Date(TicketDate) as TicketDateNum,

                  WaterTypeId,

                  OperatorId,

                  Quantity,

                  DisposalId,

                  TicketNo,

                  DeliveryType;

              SQL SELECT TicketId,

                  HaulerId,

                  TicketDate,

                  WaterTypeId,

                  OperatorId,

                  Quantity,

                  DisposalId,

                  TicketNo,

                  DeliveryType

              FROM SWD.dbo.Ticket ;

               

              STORE TicketTable INTO [lib://FolderQVD (bosque_asallee)/TicketTable.QVD] (qvd);

               

              Drop Table TicketTable;