Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

SQL DATEADD Equivalent in Load Qlikview

Hello,

I would like to use something that do the same thing as dateadd(sql) but in the load

Load

dateadd() as help,

...

Thanks

3 Replies
Highlighted

Re: SQL DATEADD Equivalent in Load Qlikview

Hi Alejandro,

You can use the AddMonths() or AddYears() function in QlikView, and you can also use the Date() function with an expression as parameter:

Date(Today() - 7 * $(vWeekOffset)) AS Date

Hope that helps.

Miguel

Highlighted
Not applicable

Re: SQL DATEADD Equivalent in Load Qlikview

i use something like this:

for week =1 to 54

DATEADD(week,1,'2010/01/01')

DATEADD(week,2,'2010/01/01')

DATEADD(week,3,'2010/01/01')

next

'2010/01/01'=Year'/01/01'

how would be?

Date(week(Today()) + 1 ) AS Date?

Highlighted

Re: SQL DATEADD Equivalent in Load Qlikview

Hi Alejandro,

It should be very similar to my example above

Weeks:

LOAD Date(WeekStart(Today()) + (7 * RecNo())) AS Week

AUTOGENERATE 54;

Search the QlikCommunity for "Master Calendar", there are lots of good examples, more simple and more complex. Check this app that builds a master calendar and uses it in expressions.

Hope that helps.

Miguel