Using a Date Calc Rule to Rename the Date Dimension

Measure Factory requires a dimension with the exact name of Date. This Date dimension must exist for the factory to process correctly. However, in some cases, such as non-English environments, you can specify an alternate name for the data set Date dimension by using a date calc rule or the date-name tag in the factory script.

NOTE: The date-name tag is available in Workbench 7.1(13) and later. See Factory Configuration File Tags.

To rename the Date dimension using a date calc rule:

  1. Create a date calc rule within the data set.
  2. Declare the two date dimensions.
  3. Alias the dimensions in scopes as needed.

For example, to change the name of the Date dimension to the Swedish word for date (Datum):

calc-rule "Date" `value("Datum")`

Declare both Date and Datum as dimensions:

dimension "Date"
dimension "Datum"

If you are using different dates in your scopes, alias both dates as needed in the scopes:

alias "Date" "Speciellt Datum"
alias "Datum" "Speciellt Datum"

In DivePort, both dimensions appear in the portlet dialog boxes, and you can choose one when you set up the portlets.

NOTE: Behind the scenes, DivePort uses Date for time series, but that is not visible to users.