Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
thimma_paul
Contributor III
Contributor III

Question on sorting for values 0-7, 8-30, 31-60, 61-100, >100 and null'-'

if((Today() - LeadLastAssignmentDate) > 100, '>100',

  if((Today() - LeadLastAssignmentDate) >= 61, '61-100',

  if((Today() - LeadLastAssignmentDate) >= 31, '31-60',

  if((Today() - LeadLastAssignmentDate) >= 8, '8-30',

  if((Today() - LeadLastAssignmentDate) >= 0, '0-7',

  '-')))))

1 Solution

Accepted Solutions
Not applicable

Hi,

Use Sort>>Expression

Put formula like this

If([Column_Name]='0-7',1, If([Column_Name]='8-30',2, If([Column_Name]='31-60',3,If([Column_Name]='61-100',4,If([Column_Name]='>100',5)))))

Regards,

KC

View solution in original post

5 Replies
thimma_paul
Contributor III
Contributor III
Author

How to sort values

Not applicable

Hi,

Use Sort>>Expression

Put formula like this

If([Column_Name]='0-7',1, If([Column_Name]='8-30',2, If([Column_Name]='31-60',3,If([Column_Name]='61-100',4,If([Column_Name]='>100',5)))))

Regards,

KC

Not applicable

Hi Thimma,

you might want to load this field as a dual, so the field has a text and underlying numeric for each value, you can then just sort by number on the field.

hope that helps

Joe

henrybrinkmann
Partner - Contributor II
Partner - Contributor II

Hi Thimma,

here an example:

=if((Today() - LeadLastAssignmentDate) > 100, Dual('>100', 1),

  if((Today() - LeadLastAssignmentDate) >= 61, Dual('61-100', 2),

  if((Today() - LeadLastAssignmentDate) >= 31, Dual('31-60', 3),

  if((Today() - LeadLastAssignmentDate) >= 8, Dual('8-30', 4),

  if((Today() - LeadLastAssignmentDate) >= 0, Dual('0-7', 5),

  Dual('-', 6))))))

it's like Joe wrote!

BR

Henry

Anonymous
Not applicable

Hi,

if(Floor(Interval(Today()-LeadLastAssignmentDate,'DD'))>100,'>100',

if(Floor(Interval(Today()-LeadLastAssignmentDate,'DD'))>=61 and Floor(Interval(Today()-LeadLastAssignmentDate,'DD'))<100,'61-100',

if(Floor(Interval(Today()-LeadLastAssignmentDate,'DD'))>=31 and Floor(Interval(Today()-LeadLastAssignmentDate,'DD'))<=60,'31-60',

if(Floor(Interval(Today()-LeadLastAssignmentDate,'DD'))>=8 and Floor(Interval(Today()-LeadLastAssignmentDate,'DD'))<=30,'8-30',

if(Floor(Interval(Today()-LeadLastAssignmentDate,'DD'))>=0 and Floor(Interval(Today()-LeadLastAssignmentDate,'DD'))<=7,'8-7',

'-')))))

Regards.

Jannet