Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
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
Partner - Champion III
Partner - Champion III

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
Partner - Champion III
Partner - Champion III

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.