Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

cancel
Showing results for 
Search instead for 
Did you mean: 
has75042
Creator
Creator

Need help in dates

Hey Everyone,

In our calendar dim table, I have FY, FY Period, and day of period column. Right now I am manually entering dates in the script and ruining the report. I need some help to automate the dates.

The report will run weekly on Sundays. In the report I have two tabs one for TY and other one for LY

TY the will be 5/4/2019. I can use this function let vTodayDate = date(today()-1) to get this year date.

I can't figure out last year date

LY tab the date will be 5/5/2018. Is there a way I can automate the dates using the calendar dim table. 

Thanks in advance. 

 

 

 

4 Replies
dilipranjith
Partner
Partner

dont understand the logic compltely but
Did you check the addyears function?
has75042
Creator
Creator
Author

 

Addyears will only work if it is a one to one match right?

 

 

dilipranjith
Partner
Partner

not clear what you mean.
share a few examples.
as i said i am unclear on your calculation logic .
i saw that when TY the will be 5/4/2019 LY is 5/5/2018.
Why is LY not 5/4/2018?
rubenmarin

Hi, if you use "let vTodayDate = date(today()-1)" to get TY date, LY date can be "let vTodayDate_LY = AddYears(date(today()-1), -1)"