Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

Last Weeks Activity

Hello one and all!

In the dashboard I am in the process of building I am trying to look at just last weeks data, below is how I look at the Year to date data, would someone be able to help me to look at just the last week using the data below as a guide?

if(inmonth ( "Activity_Date", today(), -1 ), Metric_Value, 0) as YTD_Activity,

I also require to look at the previous month as well, so its last week and last month.

Any help much appreciated.

Many Thanks,

Nick

5 Replies
Partner
Partner

Re: Last Weeks Activity

Hi NIck,

Have a look at below:

QlikView How To (or Tips & Tricks) Application by Lee Matthews

 

http://community.qlik.com/docs/DOC-5486

In the files Calendar script, Flags(CurMTDFlag,PriorMTDFlag,CurWeekFlag,PriorWeekFlag) have been used

MVP & Luminary
MVP & Luminary

Re: Last Weeks Activity

if(InWeek( "Activity_Date" , today(), -1), 1, 0) as InLastWeek


talk is cheap, supply exceeds demand
Not applicable

Re: Last Weeks Activity

Thanks for the quick reply!

It doesnt appear to work I'm afraid, do I need to add the 'Metric_Value' as it is below into it somewhere?

if(inmonth ( "Activity_Date", today(), -1 ), Metric_Value, 0) as YTD_Activity

Many thanks in advance,

Nick

Not applicable

Re: Last Weeks Activity

Anyone else got any ideas please?

Also how would I do previous month?

Many Thanks!

Nick

Not applicable

Re: Last Weeks Activity

Hello again,

I've managed to get this to work for previous month, any idea how I could get previous week using the logic below?

if(inmonth ( "Activity_Date", today(), -1 ), Metric_Value, 0) as PreMon_Activity

Many Thanks Qlikers!

Nick