Implement Dynamic Card Titles
Scenario 1
The card is configured by default to display data for today or yesterday, and the card title should include today's date and change dynamically every day.
Implementation
-
On the card editing page, filter the date range to Today, or use another method so that the card only calculates data for today.

-
Edit the card title and manually enter a time macro, such as {{{today}}}, at the appropriate position in the card title.

-
Save the card and return to the page. You can see that the card title already contains today's date.

Scenario 2
A page filter links to the card. The card title should stay consistent with the filter option and change when the filter option is switched.
Implementation Principle
Use global parameters. For details, see Global Parameters.
Implementation: Date Filter Example
-
Create a calculated field named Title. Use the concat function as needed to combine the field that references the parameter in Step 1 with text to form a title. Use text type. Note: Direct datasets must use the functions of the corresponding database. In some databases, date fields cannot be directly concatenated as text and must first be converted to text format.

-
In Card Settings on the right side of the card, disable title display.

-
Click the summary metric in the upper-left corner of the card and configure it: set the metric name to empty, either delete the original name or replace it with one space; set the metric name position to Bottom or Right; select the Title field; set the summary method to Maximum or Minimum; no data format change is needed. After clicking OK to save, the title displays the default value of the global parameter. Note: Summary metrics do not currently support font format settings.

-
To synchronize data filtering based on the filter, create an additional judgment field to filter data that meets the filter requirements. Drag this field into the filter area and select True.


-
Save the card and return to the page. Create a date filter, link it to the card, and select the time-type global parameter used in the card under linked parameters. Note: We recommend not selecting Allow Clear (Select All Dates). When a filter links to a global parameter, an empty filter does not mean selecting all or no linkage. Instead, data is filtered according to the initial default value of the global parameter, and the default value cannot be empty. The default value set in the filter cannot replace the initial default value of the global parameter.

-
Save the filter. Switch the filter, and the card effect is as follows.

Others
The method in Scenario 2 can be used not only to dynamically display dates, but also to dynamically display dimension fields, aggregation levels, and value fields, metrics. The implementation is the same.
For related usage, see Create Dynamic-Dimension Reports with Global Parameters and Implement Dynamic Metric Display with Global Parameters. See the figure below for the combined usage effect.
