[]
        
(Showing Draft Content)

Dynamically Change the Date Format in a Chart Using a Parameter

You can dynamically switch between different date formats in a chart (or table) by binding a parameter to a slicer. This allows viewers to toggle between multiple display styles—such as U.S. and European date formats—without modifying the chart design.

Example Scenario

In this example, we’ll build a simple table that displays sales data and allows the user to toggle between two date formats:

  • MM/DD/YYYY (U.S. format)

  • DD/MM/YYYY (European format)

Steps

1. Add the Table and Bind the Data

  1. In the Dashboard Designer, drag and drop your data table component onto the design area.

  2. Go to the Data Binding tab.

  3. Drag the Date data attribute into the Columns slot.

  4. Drag any other data attribute you’d like to display (for example, Sales Amount or Revenue) into the Values slot.



2. Add a Slicer for Date Format Selection

  1. Drag and drop a Label Slicer onto the dashboard.

  2. With the slicer selected, go to the Inspector tab and scroll down to the Interaction section.

  3. Under Data Source, open the dropdown and select Custom Values.

  4. A Custom Values property appears. Click the + icon twice to add two custom values:

    • MM/DD/YYYY

    • DD/MM/YYYY


  5. (Optional) Under Interaction, set Selection Mode to Single so only one format can be active at a time.

3. Bind the Slicer to the Date Format

  1. Select the Data Table again and open its Data Binding tab.

  2. In the Date field bound to the Columns slot, click the gear icon next to it.

  3. From the dropdown menu, select Edit Format.

  4. In the Format Field window that opens, scroll down and select Custom.

  5. Under Type, click the Create Parameter button and choose Use a New Parameter...



  6. In the Parameter Settings dialog:

    • Go to the Binding tab.

    • Set Source Type to Slicer.

    • Under Bind To, select the Label Slicer you created earlier.


4. Preview the Dashboard

  1. Click Preview to test the dashboard.

  2. Use the Label Slicer to switch between MM/DD/YYYY and DD/MM/YYYY.

    The table will dynamically update the date format based on your selection.



Result

You now have a table that updates its date format dynamically according to user interaction. This technique can be extended to any chart that supports custom formatting—such as column charts, line charts, or radial charts—by binding the format type to a parameter.