Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
kavieweg
Partner - Creator
Partner - Creator

KPI with automated Date

Hi together,

i want a KPI with a duration formated automatically

Unbenannt1.PNG

If it is under 24 hours (only Minutes)

if it is over 24 hours something like this:

21 days 5 hours and 20 minutes

How can i do it in Qlik Sense Despktop?

1 Solution

Accepted Solutions
petter
Partner - Champion III
Partner - Champion III

Something like this in the KPI:

Expression:

    If(d<1,Floor(d*24*60)&' minutes',Floor(d)&' days '&Replace(TimeStamp(Frac(d),'h:m'),':',' hours ')&' mins')

Label:

 

    =If(d<1,'Total waiting time in minutes','Total waiting time')

For less than 24 hours:

2018-04-14 11_47_05-_Temp - Duration KPIs _ App overview - Qlik Sense.png

For a day and upwards:

2018-04-14 11_46_38-_Temp - Duration KPIs _ App overview - Qlik Sense.png

View solution in original post

3 Replies
petter
Partner - Champion III
Partner - Champion III

Something like this in the KPI:

Expression:

    If(d<1,Floor(d*24*60)&' minutes',Floor(d)&' days '&Replace(TimeStamp(Frac(d),'h:m'),':',' hours ')&' mins')

Label:

 

    =If(d<1,'Total waiting time in minutes','Total waiting time')

For less than 24 hours:

2018-04-14 11_47_05-_Temp - Duration KPIs _ App overview - Qlik Sense.png

For a day and upwards:

2018-04-14 11_46_38-_Temp - Duration KPIs _ App overview - Qlik Sense.png

kavieweg
Partner - Creator
Partner - Creator
Author

THANK YOU PETER!!!

kavieweg
Partner - Creator
Partner - Creator
Author

Do you have the same also for weight?

e.g. g, kg, t, mega t?