Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

sureshqv
Esteemed Contributor III

Re:Time

hi ,

Need help.

PFA

my reuirment is from  ORDER_BOOK  field i want above 60min between10&30min,between 30&45min

using if Else condition ony nt usng interval match fun

Thank you

suresh

1 Solution

Accepted Solutions
MVP
MVP

Re:Time

Hi,

Try this script

LOAD SI_NUMBER,

     HEADER_ID,

     LOCATION_NAME,

     REQ_CREATION_DATE,

     ORD_CREATION_DATE,

     OSN_TIME,

     REQ_TO_ORD_CREATE_TIME_MINS,

     ORDER_BOOK_TO_OSN_TIME,

     TAT,

     If(ORDER_BOOK_TO_OSN_TIME <10, '<10',

  If(ORDER_BOOK_TO_OSN_TIME >= 10 and ORDER_BOOK_TO_OSN_TIME < 30, '10-30',

          If(ORDER_BOOK_TO_OSN_TIME >= 30 and ORDER_BOOK_TO_OSN_TIME < 45, '30-45',

               '>=45'))) AS TimeRange

FROM

(ooxml, embedded labels, table is [between 10 & 30 minutes]);

Regards,

Jagan.

10 Replies

Re:Time

These 60 min, 10-30 min are duration?

Provide some more info.

sureshqv
Esteemed Contributor III

Re:Time

hi manish

yes duration only.

Re:Time

My question is how your will get those duration?

Have you calculated in script?

are they field values or difference of two timestamps?

sureshqv
Esteemed Contributor III

Re:Time

in script part only done..no same timestamps.

just i wan the condition usng  if else

Re:Time

If(Duration < 10, '<10',

     If(Duration >= 10 and Duration < 30, '10-30',

          If(Duration >= 30 and Duration < 45, '30-45',

               '>=45')))

or

Aggr(If(Duration < 10, '<10',

     If(Duration >= 10 and Duration < 30, '10-30',

          If(Duration >= 30 and Duration < 45, '30-45',

               '>=45'))), ORDER_BOOK) 

sasiparupudi1
Honored Contributor III

Re:Time

Please provide sample data

sureshqv
Esteemed Contributor III

Re:Time

hi

i want in pivot table

PFA

MVP
MVP

Re:Time

Hi,

You can use If condition for this, IntervalMatch() is not suitable for this scenario.  Try like below

LOAD

*,

If(Duration <10, '<10',

If(Duration >= 10 and Duration < 30, '10-30',

          If(Duration >= 30 and Duration < 45, '30-45',

               '>=45'))) AS TimeRange

FROM DataSource;

Hope this helps you.

Regards,

Jagan.

MVP
MVP

Re:Time

Hi,

Try this script

LOAD SI_NUMBER,

     HEADER_ID,

     LOCATION_NAME,

     REQ_CREATION_DATE,

     ORD_CREATION_DATE,

     OSN_TIME,

     REQ_TO_ORD_CREATE_TIME_MINS,

     ORDER_BOOK_TO_OSN_TIME,

     TAT,

     If(ORDER_BOOK_TO_OSN_TIME <10, '<10',

  If(ORDER_BOOK_TO_OSN_TIME >= 10 and ORDER_BOOK_TO_OSN_TIME < 30, '10-30',

          If(ORDER_BOOK_TO_OSN_TIME >= 30 and ORDER_BOOK_TO_OSN_TIME < 45, '30-45',

               '>=45'))) AS TimeRange

FROM

(ooxml, embedded labels, table is [between 10 & 30 minutes]);

Regards,

Jagan.

Community Browser