Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
There is rate value in the table for each quarter end date of the year.
Now I want to have the same rate for each date of the respective quarter.
How to achieve that?
Try this
Table:
LOAD Date(Date#(date,'DD/MM/YYYY'),'DD/MM/YYYY') as QuarterEnd,
Date(Date#(date,'DD/MM/YYYY'),'DD/MM/YYYY') as date,
Rate;
LOAD * INLINE [
date, Rate
31/12/2017, 11
31/03/2018, 22
30/06/2018, 33
];
Calender:
LOAD Date((MinDate + IterNo() -1),'DD/MM/YYYY') as Date,
Date(Floor(QuarterEnd(MinDate + IterNo() -1)),'DD/MM/YYYY') as QuarterEnd
While (MinDate + IterNo() - 1) <= Num(MaxDate);
LOAD Min(Date#(date,'DD/MM/YYYY')) AS MinDate,
Max(Date#(date,'DD/MM/YYYY')) AS MaxDate
Resident Table;
Try this
Table:
LOAD Date(Date#(date,'DD/MM/YYYY'),'DD/MM/YYYY') as QuarterEnd,
Date(Date#(date,'DD/MM/YYYY'),'DD/MM/YYYY') as date,
Rate;
LOAD * INLINE [
date, Rate
31/12/2017, 11
31/03/2018, 22
30/06/2018, 33
];
Calender:
LOAD Date((MinDate + IterNo() -1),'DD/MM/YYYY') as Date,
Date(Floor(QuarterEnd(MinDate + IterNo() -1)),'DD/MM/YYYY') as QuarterEnd
While (MinDate + IterNo() - 1) <= Num(MaxDate);
LOAD Min(Date#(date,'DD/MM/YYYY')) AS MinDate,
Max(Date#(date,'DD/MM/YYYY')) AS MaxDate
Resident Table;