Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Assign Days to Calendar Month

Hi there

If I have a row with a start date of 25/4/2016 and an end date of the 3/5/2016

How would I go about splitting this into calendar days

The output I would like to see is as follows;

Row_ID      April-16     May-16     Total

123               5               3                8

etc

I would have thousands of rows of data so would need some kind of loop I would imagine

Thanks,

Aidan

4 Replies

Re: Assign Days to Calendar Month

You could use IntervalMatch to map these data to a calendar.

- Marcus

Re: Assign Days to Calendar Month

Data:

LOAD Row_ID,

          StartDate,

          EndDate,

         (StartDate +iterno()-1) as Date

FROM table

while StartDate +iterno()-1<=EndDate;

Not applicable

Re: Assign Days to Calendar Month

Thanks Kushal

In some cases I would only have 7 of the 8 days available to use/select from

How would I get around this?

Thanks,

Aidan

Re: Assign Days to Calendar Month

I did not get you. Can you give example?

Community Browser