Qlik Community

QlikView Publisher

Discussion Board for collaboration on QlikView Publisher.

svsudhakar
Contributor

scheduler Problem


Hi,

I have created one PDF report, I need to schedule that report as weekly , last week  and quarterly reports .

currently manually I am selecting the calendar in the dashboard and sharing the reports .now I need to schedule that reports .

please suggest is there any way to select the last week dynamically in scheduler.

Thanks in Advance,

Tags (1)
1 Solution

Accepted Solutions
Not applicable

Re: scheduler Problem

Hi Sudhakar,

you might want to look at the Inweek() function, makes for a simpler code.

Inweek(Date, today(), -1)*-1 AS [Last Week]

-1 in the function offsets to the prior week, *-1 to then turn the trues to positive


hope that helps

Joe

5 Replies
MVP
MVP

Re: scheduler Problem

Last week: =Week(Today())-1

svsudhakar
Contributor

Re: scheduler Problem

Is it possible to write this expression in scheduler level

MVP
MVP

Re: scheduler Problem

You want to select last week from a field in the application, right? If so, create an inline field with two values like :

Let vCurrWeek=Week(Today());
Let vLastWeek=$(vCurrWeek)-1;
Load * Inline [
Week, WeekSel
$(vCurrWeek), $(vCurrWeek)
$(vLastWeek), $(vLastWeek)
]
;

Now use this WeekSel field for selection in the publisher/server.

 

svsudhakar
Contributor

Re: scheduler Problem

Hi tresesco,

Thanks for your reply. With inline table I am able to select the last week but its not giving the current year. Its giving irrespective of all years.

I have created the same flag in script level as below its working fine.

if( Year(Today())=year(Date),if( Week(Today())-1 =Week(Date),1,0)) as [Last Week],

Not applicable

Re: scheduler Problem

Hi Sudhakar,

you might want to look at the Inweek() function, makes for a simpler code.

Inweek(Date, today(), -1)*-1 AS [Last Week]

-1 in the function offsets to the prior week, *-1 to then turn the trues to positive


hope that helps

Joe

Community Browser