Hi,
i am a looker developer i need to create one look.
i have a dimension called duration,
dimension: duration{
type: number
sql:${table}.duration
when i am using this i am getting only numbers as a output.(Ex.. 500000 ) , number=seconds
i need to convert (ex.. format like 1d 2h 20m 55s)
i dont have idea on this.
can you help on this
regards,
gk vardhan
I'm not sure if you solved it, but what I managed to do was to create a table calculation to transform those seconds into days (e.g. ${duration} / 24 / 60 / 60) and then format the data as hh:mm:ss
how can I convert this to an integer or decimal, I need to create an alert by using that field but for that, I need to convert the duration to a integer or decimal
Hi GK Vardhan,
To convert the 'duration' dimension from seconds to the format "1d 2h 20m 55s" in Looker, you can use LookML's convert_tz function or a custom measure with Looker's liquid templating. Feel free to ask for more details.