Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
vignesh_s
Contributor

Range Function

Hi all , Can Any1 explain the use of range function with an example

Tags (2)
1 Solution

Accepted Solutions
prma7799
Honored Contributor III

Re: Range Function

4 Replies
prma7799
Honored Contributor III

Re: Range Function

pradosh_thakur
Honored Contributor II

Re: Range Function

hi Vignesh

please close your open threads if you are satisfied or feel free to ask questions.

Learning never stops.
shiveshsingh
Honored Contributor

Re: Range Function

Pasted from Help:

RangeSum() returns the sum of a range of values.All non-numeric values are treated as 0, unlike the + operator.

Syntax:

RangeSum(first_expr[, Expression])

Return data type: numeric

Arguments:

The arguments of this function may contain inter-record functions which in themselves return a list of values.

ArgumentDescription
first_exprThe expression or field containing the data to be measured.
ExpressionOptional expressions or fields containing the range of data to be measured.

Limitations:

The RangeSumfunction treats all non-numeric values as 0, unlike the + operator.

Examples and results:

ExamplesResults
RangeSum (1,2,4)

Returns 7

RangeSum (5,'abc')Returns 5
RangeSum (null( ))

Returns 0

Add the example script to your app and run it. Then add, at least, the fields listed in the results column to a sheet in your app to see the result.

RangeTab3:

LOAD recno() as RangeID, Rangesum(Field1,Field2,Field3) as MyRangeSum INLINE [

Field1, Field2, Field3

10,5,6

2,3,7

8,2,8

18,11,9

5,5,9

9,4,2

];

The resulting table shows the returned values of MyRangeSum for each of the records in the table.
RangeIDMyRangeSum
121
212
318
438
519
615
pdelpupo
New Contributor

Re: Range Function

HI Vignesh

Please consult the help