Skip to main content
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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?

Thanks in advance.

7 Replies
sunny_talwar

How about this:

=Week(Now() - 42)

or

=Week(Today() - 42)


Not applicable
Author

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.

Anonymous
Not applicable
Author

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)

Not applicable
Author

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.

Anil_Babu_Samineni

How about this

Sum({<date ={">=max(date)-42" <=max(date)"}>} Sales)


OR


sum({<date={'>=$(=date(weekstart(max(date)-42)))'}>} Sales)

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
sunny_talwar

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

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

beginner91
Contributor III
Contributor III

hello all,

i wanted to see all my bar charts within the last 6 months. when i write =week(now()-42) its just show me 1 bar chart and i wanted to see the last 6 bar charts.