Hello, Is there a way that I can display a numeric...
# gooddata-platform
h
Hello, Is there a way that I can display a numeric metric (1,5 days) as 1d 12hrs? I was trying to rework the format: [>=86400]{{{86400||0d}}} {{{3600|24|00}}}h; [>=3600]{{{3600|24|00}}}h {{{60|60|00}}}m; [>=60]{{{60|60|00}}}m {{{|60.|00}}}s; [>0]{{{|60.|00.0}}}s; [=0]{{{|60.|0}}}
m
Hi Hans, what is the numerical value you are trying to format? Is it "1.5" (days) or "36" (hours)? I believe it should be possible to do this kind of formatting from the value of finer granularity (i.e. hours to days & hours).
j
I have tried to format metric
Copy code
select 1.5
using format:
Copy code
{{{1||##0}}}d {{{0.041666|24|#0}}}hrs
and got
Copy code
1d 12hrs
(multiply by 24=> divide by 0.41666 and apply modulo 24)
🙌 3
h
Ah, just noticed I didn't send my follow up "I would like to come to 1,5 days = 1d and 12 hours"
It's exactly what Jakub has created here! 😄
Thanks guys! 🙏