Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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

Labels (1)
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
Partner - Champion III
Partner - Champion III

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