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: 
pgalvezt
Specialist
Specialist

Sections

Hello, I have an expression with

=sum(num(date(vDate) - (Table1))) this gave me as results = Different days like 897,875,521,21,65, etc

What I want are sections according to the range for example:

section 1 800 - 900;

section 2 10 - 30;

Section 3 400 - 600;

So in the new column should be appears

Section 1 897

Section 1 875

Section 3521

Etc

rangesum(

if(sum(num(date(vDate) - (Table1))) > '800' < 900,'AA'),

if(sum(num(date(vDate) - (Table1))) > '10' < '30', 'BB'),

if(sum(num(date(vDate) - (Table1))) > '400' < '600', 'CC')) etc

I tried as dimenssion too but doesn't work.

Labels (1)
1 Solution

Accepted Solutions
Not applicable

Assuming the dimension for the expression mentioned above is dim1 then the "Section " column expression should be

if(aggr(sum(date(vDate)-Table1),dim1)<=30, 'Section 1',

if(aggr(sum(date(vDate)-Table1),dim1)<=600, 'Section 2',

if(aggr(sum(date(vDate)-Table1),dim1)<=900, 'Section 3','Section 4'

)))

Kiran.

View solution in original post

1 Reply
Not applicable

Assuming the dimension for the expression mentioned above is dim1 then the "Section " column expression should be

if(aggr(sum(date(vDate)-Table1),dim1)<=30, 'Section 1',

if(aggr(sum(date(vDate)-Table1),dim1)<=600, 'Section 2',

if(aggr(sum(date(vDate)-Table1),dim1)<=900, 'Section 3','Section 4'

)))

Kiran.