Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
kakani87
Specialist
Specialist

Master Calendar

Hi Folks ....

Am having knowledge in implementing master calendar.

When it comes to considering financial year FY in our project we consider  01-04-2018 to 31-04-2019 as Indian financial year


So for that to display calendarfinancialyear we consider  date(YearStart(tran_date,0,4),'YYYY')  as calendarFY

in the above statement 4 represents april month , now my question is why to consider 0.

when i use this in list box expression as   date(YearStart(tran_date,0),'YYYY') gives 2019 and date(YearStart(tran_date,4),'YYYY') gives 2023


But this date(YearStart(tran_date,0,4),'YYYY')  gives 2018 which is correct.


Can some one clear my doubt.

mbaeyens

stalwar1

tresesco



Regards,

Kakani.

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

The second parameter of YearStart() is how many years you want to return back or in advance:

YearStart(Today(), -1) will be 01.01.2017

YearStart(Today(), 10) will be 01.01.2028

You need the 0 because you cannot leave a blank in the second parameter. 0 refers to the current year in the date.

View solution in original post

1 Reply
Miguel_Angel_Baeyens

The second parameter of YearStart() is how many years you want to return back or in advance:

YearStart(Today(), -1) will be 01.01.2017

YearStart(Today(), 10) will be 01.01.2028

You need the 0 because you cannot leave a blank in the second parameter. 0 refers to the current year in the date.