value_format to show Duration in Days Hours Minutes Seconds doesn't work

I am trying to create a visualization to show the duration as dd days hh hours mm minutes ss seconds format. So the number 1.5 should come up as 01 days 12 hours 0 minutes 0 seconds.


I am using 

value_format: "d\"days\" h\"h\" m\"m\" s\"s\""

It works fine when the number of days is greater than 0. But when it is 0 days, it shows up as 31 days. Any suggestion on what we are doing wrong?

0 3 3,488
3 REPLIES 3

@vickydeepi-1660 

This works. Please try!

value_format: "[>=1]d\"days\" h\"h\" m\"m\" s\"s\";h\"h\" m\"m\" s\"s\""

 

e7577523-0080-4419-b61f-9206bcba0da1.png

The solution @lakshmi-1641424 didn’t work for me until I explicitly defined an [else_format] as documented here. Posting in case anyone gets stuck on this.

can you share your example of how it works? thank you

Top Labels in this Space
Top Solution Authors