To set a dynamic _as_of_date parameter, you also need to set the
Time Perspective global parameter.
About this task
The global parameter approach is sufficient for most use cases, but there are circumstances where
additional user interactions are required. For example, many customers use data warehouses that load
based on yesterday's data. When these customers run their reports today, they must manually select
yesterday's date in the _as_of_date parameter to display any data. For such
customers, using the dynamic _as_of_date parameter saves time and effort.
You can set any date you choose as the global parameter that Cognos®
Analytics
will remember. For example, you could set use yesterday
or use last
Sunday
, which are common use cases.
The Gregorian calendar ()
includes the optional specification of the Time Perspective global parameter,
which also employs the _as_of_date global parameter. When users run reports
or dashboards that include the relative date filters and measures from the Gregorian
calendar data module, they can customize these parameters for their needs.
Procedure
-
Go to Manage > Customization, and select the
Parameters tab.
- Click the Import link, and import the
_as_of_date and Time Perspective parameters from the
sample Global parameter date picker report. This report is located in
.
- From the _as_of_date parameter context menu , click Properties.
- Optional: Specify a custom label for the parameter. To specify a
language-specific label, next to Languages, click Set.
You can also add a description of the parameter, or disable it.
- Select the Applied to all roles checkbox.
When you select this property, all system and tenant user roles can use this parameter.
If you are a Cognos
Analytics
on-premises user, and want to customize this parameter for specific roles, don't select the
Applied to all roles checkbox. Instead, proceed to step 6.
- Customize the as_of_date parameter for specific roles in the
following way:
-
In , select the Accounts tab.
-
Locate the role for which you want to customize this parameter, and in the role
Properties panel, select the Customization tab.
-
Next to Parameters, click Settings.
-
Select the checkbox next to the _as_of_date parameter that you specified
in step 2.
Click OK to finish setting this parameter without changing the default
date, which is the current date. To set a specific date, select the Set
values link, select the date, and click Apply.
- Repeat steps 3-6 for the Time Perspective parameter.
- Log out, and log back in.
- In theCognos
Analytics
welcome page, select the My parameters icon in the application bar.
- For the Time Perspective parameter, select a reference date from
the drop-down menu, and click Apply
- Re-run the reports and dashboards that use relative dates.
Results
All users in the system or tenant can now see the My Parameters dialog
box, and the _as_of_date and Time Perspective
parameters are available to users when they run reports or dashboards that include the relative date
filters and measures from the Gregorian calendar data module. You can
customize these parameters. For more information, see Customizing the reference date.