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

DIfference

HI,

can anyone tell the difference between sum and rangesum function???

THANKS!!!!!!!

4 Replies
sunny_talwar

Sum is used to add values within a single field, whereas RangeSum is used to sum values across multiple fields.

tresesco
MVP
MVP

Say you have data like:

F1, F2

10, 20

30, 40

You can sum values of a single field like: Sum(F1) - gives 10+30=40

You can sun multiple field values of a record like: Rangesum(F1, F2) - gives 10+20=30 when first record is selected

hope this helps.

Not applicable

Digvijay_Singh

It also helps in handling NULLs like below -

SUM(Cost1) + Sum(Cost2), if any of both sum is null(), the whole output will be null but

Rangesum(Sum(Cost1), Sum(Cost2)) - this won't result into null() in same situation.

Thanks,