Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

juppal42
New Contributor

Add text to Duration Label

I would like to add a more descriptive label to the following table

http://imgur.com/a/rM0aF

At the moment the label has the format : 690.15:38 which is the shorthand for Days.Hours:Mins which can be a bit difficult to read. preferably I would like it to read: 690 Days, 15 Hours, 38 Mins or even 690d, 15h, 38m. I have tried looking into this but I cannot determine if this is possible or not.

The field itself is a measure and it is number formatted with the Duration format pattern: "h:mm:ss"

Tags (3)
7 Replies
MVP
MVP

Re: Add text to Duration Label

See if Marcus's response here helps:

Adding custom strings to formats (interval, date, time)

juppal42
New Contributor

Re: Add text to Duration Label

Hi Sunny

The issue I have is that I have formatted the "SettingTime" like so:

time(Frac(Timestamp([SettingTime], 'YYYY-MM-DD HH:MMSmiley FrustratedS')),'hh:mm') AS [Clean Setting Time]

in order to allow me to add up the time duration correctly. using the link you provided above does not work.

Highlighted
MVP
MVP

Re: Add text to Duration Label

Would you be able to share a sample to test it out?

juppal42
New Contributor

Re: Add text to Duration Label

Yes please see attached content on the first post. Thank you.

MVP
MVP

Re: Add text to Duration Label

What you have right now is time... do you want to see time or duration....

690 Days, 15 Hours, 38 Mins -> This would be duration as it tells me that there has been 690 days 15 hours and 38 minutes between events


10:20 -> current time...


What exactly are you looking to do? Can you clarify

juppal42
New Contributor

Re: Add text to Duration Label

Hi Sunny

I am looking to plot the duration. The rolling time is stored as a timestamp i.e 01/01/1900 00:45 and what I want from this is the amount of time passed, so 45 mins in this case.

MVP
MVP

Re: Add text to Duration Label

Yes, I see what you mean. Apologize for not seeing that earlier. It seems that formatting is still kind of restrictive in Qlik Sense. Not sure if I know how this can be done.

May be someone else might be able to help.

Best,

Sunny