Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need suggestions from you.
I have a Date, Quarter columns.
Date with 2009 to 2014 Years, and Quarters respective (2009 Q1,Q2,Q3,Q4) to 2014( Q1,Q2,Q3,Q4)
now I need to optimize my application with only latest 10 Quarters i.e (2014 (4QUarters) + 2013(4Quarters) + 2012 (2 Qurters(Q3,Q4)Every time my app should load only latest 10 Quarters of Data.
suggest me on this
Put Where condition in load statement
e.g.
Load * From xyz.qvd(qvd) Where CALENDAR_DATE >= '01/07/2012';
Regards,
Girish.
Hi,
Try like this
TableName:
LOAD
CALENDAR_DATE,
number_format,
QTR_CD,
YY_CD
FROM DataSource
WHERE CALENDAR_DATE >= QuarterStart(Today(), -9);
Hope this helps you.
Regards,
Jagan.
Jagan,
Thanks for the reply.
It does not yielded results, now even the latest year's data is not showing.
could you help me out this sample app pls
bump
Hey Smith,
Small change in Jagan's load script.
TableName:
LOAD
CALENDAR_DATE,
number_format,
QTR_CD,
YY_CD
FROM DataSource
WHERE CALENDAR_DATE >=QuarterStart(AddMonths(AddYears(today(),-2),-3))
BR,
Chinna
Hi,
Try this script
Data:
LOAD
Alt(Date(Date#(CALENDAR_DATE, 'D/M/YYYY')), Date(Date#(CALENDAR_DATE, 'DD/MM/YYYY'))) AS CALENDAR_DATE ,
number_format,
QTR_CD,
YY_CD
FROM
(ooxml, embedded labels, table is Sheet1)
WHERE Alt(Date(Date#(CALENDAR_DATE, 'D/M/YYYY')), Date(Date#(CALENDAR_DATE, 'DD/MM/YYYY'))) >= QuarterStart(Today(), -9);
Regards,
jagan.
LOAD CALENDAR_DATE,
number_format,
QTR_CD,
YY_CD
FROM
[Query.xlsx]
(ooxml, embedded labels, table is Sheet1) Where Date#(YY_CD,'YYYYMM') >= AddMonths(Today(),-40);
I am getting 6 Quarters Data only, Could you help me out to get the 10 Quarters?
Thanks for your time and solution
Hey,
Have you tried this condition in where clause:
WHERE CALENDAR_DATE >=QuarterStart(AddMonths(AddYears(today(),-2),-3))
BR,
Chinna