6 Replies Latest reply: Jul 27, 2016 8:19 AM by Sunny Talwar

# Selecting the last 6 weeks

Hi,

So I have been trying to setup a report where i select the last 6 weeks. So far i have been able to get the last week with the formula:

=week(now()-7) as a filter.

How can i transform this filter into it selecting the last 6 weeks instead of just the last week?

• ###### Re: Selecting the last 6 weeks

=Week(Now() - 42)

or

=Week(Today() - 42)

• ###### Re: Selecting the last 6 weeks

Hi Sunny,

This doesn't work, I just get the week from 6 weeks ago. But I need to select the last 6 weeks instead of just the week 6 weeks ago.

• ###### Re: Selecting the last 6 weeks

I don't really know how filters in nPrinting work, but can you do something like this?

='>=' & Week(Today() - 42) & '<=' & Week(Today)

• ###### Re: Selecting the last 6 weeks

Hi,

you can use set analysis for this ..

If you have week number ...

Sum({\$<Weekfield={">=\$(=(Max(Weekfield) -6))<=\$(=(Max(Weekfield)))"}>}sales )

Provided  Weekfield  is a Week(Datefield)

or

try this....for last 42 days (6 weeks)

=Sum({<DateField = {">=\$(=Date(Today()-42,'MM/DD/YYYY'))<=\$(=Date(Today(),'MM/DD/YYYY'))"}>} sales)

• ###### Re: Selecting the last 6 weeks

Hi Allu,

Both options are not working for me, maybe im not being clear enough i need this as a filter in N-printing. Or a way to create a filter so that when i run the report in NPrinting it selects the last six weeks minus the week we live in.