Change display format of time dimension 'Hour' values in pivot column titles?

ihayes
New Member

I have a pivot table display where I have a time dimension ‘Hour’ element displayed as the pivot field, as shown below

image

How can I change the column titles so that I get just the hour number displayed (e.g. “07”, “08”) rather than the whole date plus the hour?

0 1 223
1 REPLY 1

The way like to display times is create a dimension which represents the time as a fraction of a day, then use time formatting. Example:

Dimension: your_exisiting_dimension
...
Dimension: new_dimension  {
type:number
sql:datediff(s, ${your_existing_dimension},trunc(${your_existing_dimension})/(24.0*60*60));
value_format: "HH"

That is redshift. Our databases will likely need something slightly different,

Top Labels in this Space
Top Solution Authors