Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ruma_barman
Creator
Creator

Inputing value for each line time for all dates of the quarter

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?

1 Solution

Accepted Solutions
sunny_talwar

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;


Capture.PNG

View solution in original post

1 Reply
sunny_talwar

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;


Capture.PNG