Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Format an interval result as ###.###

Hello,

I need to do a pivot table with the following information.

I have problems to represent the field DurationMinutes like a number with format ###.###

SCHEDULE:

LOAD

    ScheduleDate,

    START_TIME as ScheduleStart,

    END_TIME as ScheduleEnd,    

    time(DELAY_END_TIME - DELAY_START_TIME,'hh:mm:ss') as Duration,

    interval(DELAY_END_TIME - DELAY_START_TIME,'mm') as DurationMinutes

FROM [..\Timing.xls];

I can´t represent the field DurationMinutes like a number.

7 Replies
sunny_talwar

May be this:

SCHEDULE:

LOAD

    ScheduleDate,

    START_TIME as ScheduleStart,

    END_TIME as ScheduleEnd,   

    time(DELAY_END_TIME - DELAY_START_TIME,'hh:mm:ss') as Duration,

    Num(DELAY_END_TIME - DELAY_START_TIME,'###.###') as DurationMinutes

FROM [..\Timing.xls];

Not applicable
Author

It doesn´t work the result have to be like the filed IncidenceDurationMin with millar point

3

7.203

yura_ratu
Partner - Creator II
Partner - Creator II

Hi Ana,

Try this one

num((DELAY_END_TIME-DELAY_START_TIME)*1440,'#,##0.') as DurationMinutes

Anonymous
Not applicable
Author

Try it.

NUM(Interval(DELAY_END_TIME - DELAY_START_TIME,'MM'),'###.###') as DurationMinutes

Regards.

Not applicable
Author

Hi Ana! Try this:

SCHEDULE:

LOAD

    ScheduleDate,

    START_TIME as ScheduleStart,

    END_TIME as ScheduleEnd,   

    time(DELAY_END_TIME - DELAY_START_TIME,'hh:mm:ss') as Duration,

    num(interval(DELAY_END_TIME - DELAY_START_TIME,'mm'), '###.###') as DurationMinutes

FROM [..\Timing.xls];

I hope that it help you !

MarcoWedel

Hi,

some solutions could be also:

QlikCommunity_Thread_189061_Pic1.JPG

Num(Num#(Interval(IncidenceEnd-IncidenceStart,'mm')),'#.###') as IncidenceDurationMin        

Num((IncidenceEnd-IncidenceStart)/'00:01:00','#.##0') as IncidenceDurationMin

rounding minutes off:

Num(Floor((IncidenceEnd-IncidenceStart)/'00:01:00'),'#.##0') as IncidenceDurationMin

Num(Div(IncidenceEnd-IncidenceStart,'00:01:00'),'#.##0') as IncidenceDurationMin

hope this helps

regards

Marco

lenka_kruse
Partner - Contributor III
Partner - Contributor III

Thank you so much, this just saved my day!