Create a parameter that allows the user to select an anchor date for a fixed relative time range, for example the last 3 months from the anchor date.
DATEDIFF('month',[Order Date],[Choose Anchor Date]) <= 2 AND DATEDIFF('month',[Order Date],[Choose Anchor Date]) >= 0Create a parameter that allows the user to select an anchor date for a year to anchor date time range, for example the start of the year to the chosen anchor date.
DATEDIFF('year',[Order Date],[Choose Anchor Date]) = 0 AND [Order Date] <= [Choose Anchor Date]Option 1 will return the exact same results as setting a static anchor date in the Filter dialog. If there is data for dates after the chosen anchor date, this option will includes dates for the entire month of the anchor date. For example, if March 15 is chosen, the view will show dates between January 1 and March 31.
Option 2 will end the date range at the chosen anchor date. For eample, if March 15 is chosen, the view will show dates between January 1 and March 15.
For added flexibility, additional parameters can be created to define the date part, such as 'month' or 'year', and the number of date parts back the filter goes. For example, the calculation in option 1 might become:DATEDIFF([Date Part Parameter],[Order Date],[Choose Anchor Date]) <= [# of Date Parts Parameter] - 1 AND DATEDIFF([Date Part Parameter],[Order Date],[Choose Anchor Date]) >= 0
For a dynamic anchor date, such as last month, the [Choose Anchor Date] parameter can be replaced with a calculated field that defines a dynamic date. For example, a calculation that always returns the first day of last month may look like:DATETRUNC('month', DATEADD('month', -1, TODAY() ))
001458277
1207 KB

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.