Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

sum row values in qlik sense

Hi all.

I have a csv file like this:

NAME     VALUE1        VALUE2      VALUE3

John        1          5           8

Steve       2          6           3

I want to present the same data in a table plus a column with the sum of the VALUE{1,2,3} like this:

NAME     VALUE1        VALUE2      VALUE3       VALUESTOTAL

John        1          5           8            14

Steve       2          6           3            11

I tried with SUM and the showing total is 0.

Somebody can please tell me a light?

Thanks!

Tags (1)
1 Solution

Accepted Solutions
MVP
MVP

Re: sum row values in qlik sense

Try :

=RangeSum(VALUE1,VALUE2,VALUE3)

7 Replies
MVP
MVP

Re: sum row values in qlik sense

Try :

=RangeSum(VALUE1,VALUE2,VALUE3)

balrajahlawat
Esteemed Contributor

Re: sum row values in qlik sense

what about this?

=sum(Value1)+sum(Value2)+sum(Value3) as ValuesTotal

reddys310
Honored Contributor II

Re: sum row values in qlik sense

Hi Chan,

Use the RangeSum function to achive this as tresesco mentioned.

Re: sum row values in qlik sense

Try this way

In Expression

=Sum(VALUE1 + VALUE2 + VALUE3)

Or

=Sum(VALUE1) + Sum(VALUE2) + Sum(VALUE3)

Regards,

Anand

brunobertels
Valued Contributor

Re: sum row values in qlik sense

Hi

Try like that

data:

load * inline

    [NAME,VALUE1,VALUE2,VALUE3

    John,1,5,8 

    Steve,2,6,3];

   

  

    Data2:

    load

     NAME,

    VALUE1,

    VALUE2,

    VALUE3,

    VALUE1+VALUE2+VALUE3 as SumValue

  

    resident data;

    drop table data

you will get this :

Bruno

Not applicable

Re: sum row values in qlik sense

Hi all.

Thanks for your answers, by now, doesn't work (rangesum or sum)

I forgot mention that my VALUE columns are product of a subfield statement in the load script:

    subfield([BIG ACTIVITIES], ' ', 1) as TYPEOFACT,

    subfield([[BIG ACTIVITIES], ' ', 2) as VALUE1,

    subfield([[BIG ACTIVITIES], ' ', 3) as VALUE2,

    subfield([[BIG ACTIVITIES], ' ', 4) as VALUE3,

Any clue?

Not applicable

Re: sum row values in qlik sense

Solved with rangesum.

My issue: VALUE{1,2,3} has strings and must be operated BEFORE of sum, in my case, with COUNT.

Thanks a lot for the help!