Custom Dates
Custom dates are useful if you always use a date at a specific level, or if you want to create calc that rely on a binned or truncated date.
You can create a custom date in the Data pane or writing a calc with the DATEPART
or DATETRUNC
functions.
- Right-click (control-click on Mac) a date field in the Data pane and select Create > Create Custom Date.
- From the Detail list, select the level you want.
- Specify whether you want the custom date to be discrete (Date Parts) or continuous (Date Value).
- Optional: Enter your own name for the field.
- When you’re finished, click OK.
Custom dates created this way appear as new fields in the Data pane.
Example - format column headers as Month, Day, Year
This example uses the Sample - Superstore data source.
- Drag [Order Date] to Columns.
- Drag Sales to Rows.
- Right-click [Order Date] on the Columns shelf and choose More > Custom.
- In the Custom Date dialog box, choose Month / Day /Year from the Detail drop-down list.
The view now has the column headers in the correct format: