Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Not applicable

Inline interval dimensions

Hi Everyone


I have below fields.

Load *,

as no_of_days_to_solve  // gives me number of days which is enddate - start date.

How can i create dimension that shows

Case took more then 15 days

Case solved in 15 days

case solved in 10 days

case solved in 5-10 days

case solved within 5 days

LOAD [Ticket Number],

     [Requestor Name],

     [Support Group],

     [Call Summary],

     [Call Status],

     [Call Severity],

     [Call Type],

    [Create Date],

     Year ([Create Date]) as year,

     month ([Create Date]) as Month,

     day([Create Date]) as day,

   

    [Closed Date]

FROM   

7 Replies
Partner
Partner

Re: Inline interval dimensions

Try to use IF

IF(no_of_days_to_solve<=5, '0-5 days',

     no_of_days_to_solve>5 and no_of_days_to_solve<=10, '6-10 days',

     no_of_days_to_solve>10 and no_of_days_to_solve<=15, '11-15 days',

'16+ days'

) AS YourDimension

Regards,
Sergey
Not applicable

Re: Inline interval dimensions

Thanks Sergey

I am getting syntax error after second statement where we are testing for 5 to 10.

no_of_days_to_solve>5 and no_of_days_to_solve<=10 // syntax error start from comma , '6-10 days',

Partner
Partner

Re: Inline interval dimensions

sorry... my mistake

IF(no_of_days_to_solve<=5, '0-5 days',

     IF(no_of_days_to_solve>5 and no_of_days_to_solve<=10, '6-10 days',

     IF(no_of_days_to_solve>10 and no_of_days_to_solve<=15, '11-15 days',

'16+ days'

))) AS YourDimension

Regards,
Sergey
MVP
MVP

Re: Inline interval dimensions

I recommend class().

SunilChauhan
Esteemed Contributor

Re: Inline interval dimensions

use class function like below

Class(no_of_days_to_solve,5,'no_of_days_to_solve') as  fieldname

and use in dimension

hope this helps

Not applicable

Re: Inline interval dimensions

How to use Class () function for below example.

IF(no_of_days_to_solve<=5, '0-5 days',

     IF(no_of_days_to_solve>5 and no_of_days_to_solve<=10, '6-10 days',

     IF(no_of_days_to_solve>10 and no_of_days_to_solve<=15, '11-15 days',

'16+ days'

))) AS YourDimension

Highlighted
Partner
Partner

Re: Inline interval dimensions

IF(RIGHT(Class(no_of_days_to_solve,5),2)>15, '16+', Class(no_of_days_to_solve,5))  AS YourDimension

Or you can use directly in the chart as calculated dimension

IF(RIGHT(Class(no_of_days_to_solve,5),2)>15, '16+', Class(no_of_days_to_solve,5))

Regards,
Sergey