Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Author

jagan
Luminary Alumni
Luminary Alumni

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.

jagan
Luminary Alumni
Luminary Alumni

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.