Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Convert number in days and hours

Hello everyone, I have a problem and quisiser know if I can help get the following information:

My

  1. Monitoring

AVG T. Atención

AVG

12890

  1. 0.441790954
  2. 0.44179095

one

2172

  1. 0.42090322
  2. 0.42090322

feb

3713

  1. 0.419268926
  2. 0.41926893

mar

2595

  1. 0.36465677
  2. 0.36465677

abr

2137

  1. 1.022257399
  2. 1.0222574

may

1759

  1. 0.045884953
  2. 0.045884953

jun

514

  1. 0.023692738
  2. 0.023692738

And the problem in April to spend this time in excel format gives me 1 day with 32 minutes of this form

 

My

  1. Monitoring

AVG T. Atención

AVG

12890

  1. 0.441790954

00: 10: 36: 11

one

2172

  1. 0.42090322

00: 10: 06: 06

feb

3713

  1. 0.419268926

00: 10: 03: 45

mar

2595

  1. 0.36465677

00: 08: 45: 06

abr

2137

  1. 1.022257399

01: 00: 32: 03

may

1759

  1. 0.045884953

00: 01: 06: 04

jun

514

  1. 0.023692738

00: 00: 34: 07

I wonder if I can do it in graphic QlikView because if this is wrong and gives me a gráica of attention tiempode wrong, but wrong gives me a pop just to 32 minutes and this causes confusion

Captura.PNG

And I'd like to leave 1 days 32 minutes of attention.

I hope you can help me.

21 Replies
sunny_talwar

How do I know if the circled part is Day 01? Do you have a start and end date somewhere which is doing the calculation?

Not applicable
Author

Hello Sunny,

Well first i do this in the script, there are two rows;

FECHA_ASIGN-FECHA_AP as TiempoAten

Then i calculate from the graphic whit this

avg({$<BUZON={'MONITOREO*'}>}TiempoAten)

This is the calculation, buth i see the day 01 when i export the data to Excel, i can´t see in ClikView before that.

Thanks

MarcoWedel

Hi,

you could change the number format of your AVG expression from time to interval:

QlikCommunity_Thread_171189_Pic1.JPG

QlikCommunity_Thread_171189_Pic2.JPG

QlikCommunity_Thread_171189_Pic4.JPG

QlikCommunity_Thread_171189_Pic3.JPG

hope this helps

regards

Marco

krishna20
Specialist II
Specialist II

Hi,

Is this your expected output??. Sorry if i'm wrong.Comm_171189.png

Not applicable
Author

Hi Marco,

Thanks for your hellp, it´s exactly what i want, only one more question, if i want to put in the emergent

like AVG = 1 day 00:32:03, in te format of interval i put some like D 'day' hh:mm:ss but the result is

Captura.PNG

Regards

Josué

Not applicable
Author

Hi Krishna,

Yes, this is the output, the problem is the emergent, but Marco give me the correct answer.

Regards.

Josué

krishna20
Specialist II
Specialist II

Hi,

Is your exact O/P which i gave the screen shot ???

krishna20
Specialist II
Specialist II

Hi,

If the above one is your exact output.To achieve this ,Go to properties of chart -> Axes->

Select your Expression (AVG)-> Select Position Right (Top)

Comm_Chart.png

Not applicable
Author

Thanks Krishna

MarcoWedel

The 'd' and 'y' characters are treated as interval formats, i.e. are displayed as day and year numbers.

One possibility could be to change the AVG number format to "expression default" and the AVG expression itself to:

=Dual(

      SubField(Interval(Avg({$<BUZON={'MONITOREO*'}>}TiempoAten),'D hh:mm:ss'),' ',1)

      &' days '&

      SubField(Interval(Avg({$<BUZON={'MONITOREO*'}>}TiempoAten),'D hh:mm:ss'),' ',2)

      ,

      Avg({$<BUZON={'MONITOREO*'}>}TiempoAten)

    )

hope this helps

regards

Marco