Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Data load

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.

2 Replies
swuehl
MVP
MVP

Maybe use a WHERE clause like

LOAD * FROM YourQVD.qvd (qvd)

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

NickHoff
Specialist
Specialist

I'd create an indicator in your master calendar:

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

Create an INLINE table for a QuarterLimiter:

QuarterLimiter:

LOAD * INLINE [QLimit

1

];

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