Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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
jpenuliar
Partner - Specialist III
Partner - Specialist III

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

Gysbert_Wassenaar

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


talk is cheap, supply exceeds demand
Not applicable
Author

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
Author

Anyone else got any ideas please?

Also how would I do previous month?

Many Thanks!

Nick

Not applicable
Author

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