Last Modified Date: 08 Jul 2022
Environment
- Tableau Desktop
Answer
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.Thank you for providing your feedback on the effectiveness of the article.
Open new Case
Continue Searching
Knowledge Base
Community
Product Help
Training and Tutorials