Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
stephenedberkg
Creator III
Creator III

Fiscal calendar

I have the date field.

i have to change start date of the year is 16-12 for all the year

16-12-2016 to 15-01-2017 for jan month

16-02-2017 to 15-03-2017 for feb month

i have attached the sample date please find it .

thanks in advance

10 Replies
tresesco
MVP
MVP

Try like:

Load

          Date,

          Month(Date-15) as Month

stephenedberkg
Creator III
Creator III
Author

if i click the month jan 2017 mean it should calculate the data form

dec 16-12-2016 to 15-01-2017

  

idSalesdate
220020-12-2016
440013-01-2017

sales values is 600

tresesco
MVP
MVP

It should be '+' then. Try:

Month(Date + 15) as Month

stephenedberkg
Creator III
Creator III
Author

how to add this in master calandar

tresesco
MVP
MVP

When you create month in the master calendar, use this code.

stephenedberkg
Creator III
Creator III
Author

this is my sample data ...

i am using master calandar in my application

before that i am using normal master calandar

but now client ask 1st date of the year is 16-12 like wise

tresesco
MVP
MVP

May be I could not make it clear. Let me explain it again. When you create a master calendar, you use script something like:

Load

          Date,

          Month(Date) as Date,              // just replace this script with the one I suggested above.

          Year(Date) as Year

From <>; // or may be using autogenerate

stephenedberkg
Creator III
Creator III
Author

thank you but

all the month i should take the 16 day only

but iin 31 days month it takes 17 th day

30 month it take 16 th day

tresesco
MVP
MVP

Try like:

Load

       Date,

       Month(Date) as ActualMonth,

       Year(If(Day(Date)>=16, Addmonths(MonthStart(Date),1), Date)) as CustomYear,

       Month(If(Day(Date)>=16, Addmonths(MonthStart(Date),1), Date)) as CustomMonth;

Load

  Date(AddYears(Today(),-1)+RecNo()) as Date

AutoGenerate 800;