Reputation: 3
I have set of data that is automatically updated each day with new lines. On the other hand my graphs shows weekly/monthly data.
Is there any way to exclude current week/month, so that the graph can be automatically updated on the server, without me manually excluding and including weeks/months each time I have data for full week/month?
Upvotes: 0
Views: 8073
Reputation: 11
make a copy of your date field. Drop on filter, select condition tab, select by formula and drop this in the field:
datetrunc('week',[Order Date (copy)]) <> datetrunc('week',today())
Upvotes: 1
Reputation: 3369
Here's another option which I use regularly in my reports.
STR(DATEDIFF('week', [Date], today(), 'monday'))
Note that here I have specified my weeks start on Monday, your requirement may be different.
exclude
the value 0
, as in the index the current week will always be 0
, last week will be 1
etc.Upvotes: 3
Reputation: 712
This is an untested example of a calculated field to exclude current week:
IF DATETRUNC('week',[your date field]) = DATETRUNC('week',NOW()) THEN
'filter me'
ELSE
'leave me'
END
Drag that calculated field to filters. In case you couldn't guess, exclude the 'filter me' value :)
Upvotes: 1