Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Skip the ticket, Chat with Qlik Support instead for instant assistance.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Generating a inline table with last date of each month of a year

Hi,

I want to generate an inline table using qv script such that  the table contains     field  Year ,  Month, LastDayMonth,

here is an example

YearMonthLastDayMonth
2012 Jan31-01-2012
2012Feb29-02-2012
2012Mar31-03-2012
2012Apr30-03-2012
2012May31-03-2012
2012Jun30-03-2012
2012Jul31-03-2012
2012Aug30-03-2012
2012Sep31-03-2012
2012Oct30-03-2012
2012Nov31-03-2012
2012Dec31-03-2012

Year can be from 2000 till 2020

can anyone help me out with this.:)

Regards,

Tushar 

1 Solution

Accepted Solutions
stephencredmond
Luminary Alumni
Luminary Alumni

Hi,

I would do a loop like this:

For y=2000 to 2020

          For m=1 to 12

 

                    Calendar:

                    Load

                              $(y) As Year,

                              Dual(SubField('$(MonthNames)', ';', $(m)), $(m)) As Month,

                              Date(Floor(MonthEnd(MakeDate($(y), $(m))))) As MonthEndDate

                    AutoGenerate(1);

 

          Next

Next

Regards,

Stephen

Stephen Redmond is author of QlikView for Developer's Cookbook

He is CTO of CapricornVentis a QlikView Elite Partner. We are always looking for the right people to join our team.

Follow me on Twitter: @stephencredmond

View solution in original post

2 Replies
stephencredmond
Luminary Alumni
Luminary Alumni

Hi,

I would do a loop like this:

For y=2000 to 2020

          For m=1 to 12

 

                    Calendar:

                    Load

                              $(y) As Year,

                              Dual(SubField('$(MonthNames)', ';', $(m)), $(m)) As Month,

                              Date(Floor(MonthEnd(MakeDate($(y), $(m))))) As MonthEndDate

                    AutoGenerate(1);

 

          Next

Next

Regards,

Stephen

Stephen Redmond is author of QlikView for Developer's Cookbook

He is CTO of CapricornVentis a QlikView Elite Partner. We are always looking for the right people to join our team.

Follow me on Twitter: @stephencredmond

Not applicable
Author

Just what i needed Thanks a lot !