Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Read about the latest Qlik Community enhancements on the Community News blog!
cancel
Showing results for 
Search instead for 
Did you mean: 
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
SergeyMak
Partner
Partner

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
Author

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',

SergeyMak
Partner
Partner

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
tresesco
MVP
MVP

I recommend class().

IamBack
Champion
Champion

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
Author

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

SergeyMak
Partner
Partner

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