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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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   

Labels (1)
7 Replies
SergeyMak
Partner Ambassador
Partner Ambassador

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 Ambassador
Partner Ambassador

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
tresB
Champion III
Champion III

I recommend class().

SunilChauhan
Champion II
Champion II

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

Sunil Chauhan
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 Ambassador
Partner Ambassador

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