Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How can I always return the last 'X' number of days/weeks/etc in set analysis?
Currently, I'm trying to return the last 4 weeks, but I don't believe my results are accurate.
Here's the piece of code I'm using currently..
{<Model2.Week_Res = {"<=$(=( week(date(today(0)))))>=$(=( week(date(today(0) - 4))))"} >}
where Model2.Week_Res is the week #. To ensure this only pulls the latest year, I'll include Model2.Year_Res = MAX year
Hello Duke,
{<Model2.Year_Res={'$(=Max(Year))'}, Model2.Week_Res={''>=$(=Week(Today(0))-4)<=$(=Week(Today(0)))'}>}
Check out the attachment you will get an idea as how expression works. I used to check my expressions like this.
Hello Duke,
{<Model2.Year_Res={'$(=Max(Year))'}, Model2.Week_Res={''>=$(=Week(Today(0))-4)<=$(=Week(Today(0)))'}>}
Check out the attachment you will get an idea as how expression works. I used to check my expressions like this.
Hi Tamil, this doesn't seem to answer the question I've posed. Your QVW is excluding the most recent 4 weeks, I want everything excluded EXCEPT the most recent four weeks. I've tinkered with your formula and still have not been able to get my charts to return the proper values..
Or may be you can use Date field and WeekStart(Max(Date)-28) & WeekStart(Max(Date)) as your two min & max parameters. You can play with number '28' to fit your requirement.
Also you can try
Right(WeekName(max(Date)),2)-4 & Right(WeekName(max(Date)),2) as your min & max parameter respectively.