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

define fiscal year calendar in script with min & max date

Hi guys

I don't get a financial calendar

I have following things:

CONNECT TO XYZ;

Load [Posting Date],

     Month([Posting Date]) as Month,

     Year([Posting Date]) as Year;

SQL SELECT [Posting Date] FROM XYZ;


My intention is to create a calendar with the financial section which is from October YEAR to septemer YEAR+

It would be nice to create a FROM - TO calendar in to tables


And my 2. lil question is: How can I fix the order of the Month ? with Match?

Because in my database it starts from another date, not october ..


Best regards, Tobias

3 Replies
Not applicable

Re: define fiscal year calendar in script with min & max date

MVP
MVP

Re: define fiscal year calendar in script with min & max date

Hi,

Try like this

LET FROMDate = Today();

LET TODate = Today() + 500;

Calendar:

Load

RowNo(),

  DAte($(FROMDate) + RowNo()) AS Date,

     Month($(FROMDate) + RowNo()) as Month,

     Year(YearStart($(FROMDate) + RowNo(), 0, 10)) as Year

AutoGenerate Floor($(TODate) - $(FROMDate));

REgards,

Jagan.

MVP
MVP

Re: define fiscal year calendar in script with min & max date

Hi,

For Month Sorting use match or try like this

Calendar:

Load

RowNo(),

  DAte($(FROMDate) + RowNo()) AS Date,

    Alt(Text(Month($(FROMDate) + RowNo())), Match(Text(Month($(FROMDate) + RowNo())), 'Oct', 'Nov', 'Dec', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep')) as Month,

     Year(YearStart($(FROMDate) + RowNo(), 0, 10)) as Year

AutoGenerate Floor($(TODate) - $(FROMDate));

Regards,

Jagan.

Community Browser