Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

chandrikag
New Contributor II

Regarding the working of Rangesum()

I would like to know how RANGESUM() works and what would the result be for this: RANGESUM(1,2,'abc',NULL(),5)?

Please let me know.

1 Solution

Accepted Solutions

Re: Regarding the working of Rangesum()

To check the output, you can create a text object with the expression you have:

Capture.PNG

It is summing non-null numeric values (1, 2, and 5) and ignores null and letters.

6 Replies

Re: Regarding the working of Rangesum()

To check the output, you can create a text object with the expression you have:

Capture.PNG

It is summing non-null numeric values (1, 2, and 5) and ignores null and letters.

chandrikag
New Contributor II

Re: Regarding the working of Rangesum()

Thank you Sunny!

Community Manager
Community Manager

Re: Regarding the working of Rangesum()

Hi Chandrika,

I'm glad you were able to get some assistance. If Sunny's reply fully answered your question, please take a moment to mark his post as the Correct Answer. This changes the thread category from Unanswered Question to Answered Question and awards points to Sunny for helping you.


For more details, please see this thread: Qlik Community Tip: Marking Replies as Correct or Helpful

Best regards,

Qlik Community Moderation Team

Re: Regarding the working of Rangesum()

RangeSum() is not an aggregation function. It sums only individual numerical values that are listed as parameters to this call. There is no limit to the number of parameters you can specify.

Best,

Peter

Re: Regarding the working of Rangesum()

In addition to the preceding, RangSum() will always return a value because invalid values (like text or NULL values) will all be treated as 0. That's the main and very useful difference with the + operator which fill return NULL as soon as even one operand proves to be invalid or NULL.

chandrikag
New Contributor II

Re: Regarding the working of Rangesum()

Thank you Cammaert!

Community Browser