Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
dusasuman
Creator
Creator

Range sum intervals

Hi Community,

I want to calculate sum of values based on range of id values rolling back on each number. These range of bucket is coming from other table. and for each row there would be 3 buckets which we need to roll back and do sum. Please understand the sheet1, sheet2 input data.

Start1,End1; Start2,End2; Start3,End3 fields are the intervals that we need to do sum from other table based on range of values.

Here i am attaching input data (excel). and my qlik working file.

Refer output sheet in excel file for my desired output.

Thanks in Advance,

1 Reply
sunny_talwar

May be try this

If(Bucket= '0-4',

Sum(If(Date >= Start1 and Date <= End1, Amount)),

If(Bucket= '06-16',

Sum(If(Date >= Start2 and Date <= End2, Amount)),

If(Bucket='17-28',

Sum(If(Date >= Start3 and Date <= End3, Amount))

)))