Set Custom Time Interval In [Pages] And Switch Between Different Time Intervals With Parameter

Published: 27 May 2020
Last Modified Date: 08 Jul 2022


How to customize the time interval in second time unit in [Pages] such as 5 seconds, 10 seconds, etc. for monitoring data with the change of time interval.


  • Tableau Desktop


To customize time intervals in [Pages], create calculated field that groups data according to time interval and create a parameter to switch between different time intervals.

Step 1: Create the Parameter

1. Create a Parameter named [Time Interval]
    Allowable values: List
    List of Values: 5, 10, 15 (The Time Interval needed)
2. Right-click [Time Interval] in [Parameter], select [Show Parameter Control].

Step 2: Create the Calculated Field

1. Create a Calculated Field named [Time Group] and input the Formula:
    INT((DATEPART('hour',[Time])*60*60+DATEPART('minute',[Time])*60+DATEPART('second',[Time]))/[Time Interval])
    (This formula separate data into groups based on the seconds time interval defined in parameter above, and [Time] is the time field need to be customized)
2. Create a Calculated Field named [Customized Internal Time] and input the Formula:
    { FIXED [Time Group]: MIN([Time]) }
3. Drag [Customized Internal Time] to [Pages].
4. Right-click [Customized Internal Time] in [Pages], select [More] > [Second]
Note: Now the customized time intervals can be switched by Parameter Control.



Additional Information

This Calculation Field above is made to customize time interval in second unit.
Did this article resolve the issue?