2 Replies Latest reply: Sep 7, 2016 4:33 PM by Nick Hoff RSS

    Data load

    Shantnu Patel

      I have YearQtr field in QVD , which stores values like 2014Q1,2014Q2,2014Q3,2014Q4,2015Q1,2015Q2,2015Q3...


      I am loading data from the qvd to application,I just want to load data till last quarter in to application from qvd.


      like if i am loading data in month of October , November or December 2015 it should load data till 2015Q3 into application even though my qvd have October or November  2015 month data.

        • Re: Data load
          Stefan Wühl

          Maybe use a WHERE clause like


          LOAD * FROM YourQVD.qvd (qvd)

          WHERE YearQtr precedes Year(Today(1) &'Q' & Ceil(Month(Today(1))/3);

            • Re: Data load
              Nick Hoff

              I'd create an indicator in your master calendar:


              Num(month(QuarterEnd(Today(),-1))) AS PreviousQuarterIND,


              Create an INLINE table for a QuarterLimiter:



              LOAD * INLINE [QLimit




              Load the calendar prior to your fact table, then do a where exists(QLimit,PreviousQuarterIND)