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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Fiscal calendar

Hello Experts,

How i make the Fiscal calendar which is start from april.

Thanks

1 Solution

Accepted Solutions
its_anandrjs
Champion III
Champion III

See the attached sample application for the Fiscal calendar

Let varMinDate = Num(Makedate(2006,1,1));

Let varMaxDate = Num(Makedate(Year(today()),Month(today()),Day(today())));

Datefield:

LOAD date($(varMinDate)+IterNo()-1) AS Datefield

AUTOGENERATE (1)

WHILE $(varMinDate)+IterNo()-1<= $(varMaxDate);

Set vFM = 4 ;                                                          // First month of fiscal year

Calendar:

Load Dual(fYear-1 &'/'& fYear, fYear) as FYear,          // Dual fiscal year

     Dual(Month, fMonth)              as FMonth,            // Dual fiscal month

          *;

Load Year + If(Month>=$(vFM), 1, 0)  as fYear,         // Numeric fiscal year

         Mod(Month-$(vFM), 12)+1      as fMonth,         // Numeric fiscal month

          *;

Load Year(Datefield)                  as Year,           // Your standard master calendar

         Month(Datefield)             as Month,

Datefield

Resident Datefield;

DROP Table Datefield;

Regards

View solution in original post

5 Replies
its_anandrjs
Champion III
Champion III

its_anandrjs
Champion III
Champion III

Create a fiscal calendar with this script

        Set vFM = 4 ;                                                          // First month of fiscal year

Calendar:
Load Dual(fYear-1 &'/'& fYear, fYear) as FYear,          // Dual fiscal year
         Dual(Month, fMonth)                as FMonth,           // Dual fiscal month
          *;
Load Year + If(Month>=$(vFM), 1, 0) as fYear,           // Numeric fiscal year
         Mod(Month-$(vFM), 12)+1        as fMonth,          // Numeric fiscal month
          *;
Load Year(Date)                              as Year,           // Your standard master calendar
         Month(Date)                            as Month,

its_anandrjs
Champion III
Champion III

See the attached sample application for the Fiscal calendar

Let varMinDate = Num(Makedate(2006,1,1));

Let varMaxDate = Num(Makedate(Year(today()),Month(today()),Day(today())));

Datefield:

LOAD date($(varMinDate)+IterNo()-1) AS Datefield

AUTOGENERATE (1)

WHILE $(varMinDate)+IterNo()-1<= $(varMaxDate);

Set vFM = 4 ;                                                          // First month of fiscal year

Calendar:

Load Dual(fYear-1 &'/'& fYear, fYear) as FYear,          // Dual fiscal year

     Dual(Month, fMonth)              as FMonth,            // Dual fiscal month

          *;

Load Year + If(Month>=$(vFM), 1, 0)  as fYear,         // Numeric fiscal year

         Mod(Month-$(vFM), 12)+1      as fMonth,         // Numeric fiscal month

          *;

Load Year(Datefield)                  as Year,           // Your standard master calendar

         Month(Datefield)             as Month,

Datefield

Resident Datefield;

DROP Table Datefield;

Regards

mdmukramali
Specialist III
Specialist III

Dear ,

find the attached sample apps.

Thanks,

Mukram.