1 Reply Latest reply on Nov 7, 2012 1:52 PM by Mark Holtz

    Previous week, with options to still use date range slider

    Rob Bisaillon

      I have a requirement to have a filter created to display transactions processed during the previous week and still have the abilty to select a specific date range in the reports. The extract contains a years worth of data.

        • 1. Re: Previous week, with options to still use date range slider
          Mark Holtz

          Hi Rob,

          To try to rephrase, are asking how to filter to show the last full calendar week (Sunday to Saturday)?

           

          If that's the case, you could create an additional calculated field:
          IF DATEPART('week',[DateField]) = DATEPART('week',[DateField])-1
          THEN 'Show'
          ELSE 'Hide'
          END

           

          Then, just add that new field to your filter.

           

          Another approach you may find useful is to simply create 2 parameters to allow your users to select start date and end date range they choose.

           

          1) Create a date parameter as Start Date
          2) Create a date parameter as End Date
          3) Create a calculated field as:

          IF [DateField] >= [StartDate] AND [DateField] <= [EndDate]
          THEN 'Show'

          ELSE 'Hide'
          END

           

          You can drag that calculated field into the filter and then the user can set the date endpoints as desired.
          Hope this helps!