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

show sum of several column from a another tablebox

hi,

i have a tablebox with 4 fields by 4 rows.

i want to sum the result of 2 specific fields F1 & F2 together.

the script (example) is like this:

LOAD * INLINE [

    F1, F2, F3, F4

    1, 5, A, X

    2, 6, B, X

    3, 7, C, X

    4, 8, D, X

];

the total sum will be displayed in a different textbox.

how can it be done?

moti

5 Replies
Not applicable
Author

Sum(F1) + Sum(F2)

Where are you confused?

Not applicable
Author

thanks, Rebecca for your reply.

i forgot to add that F1,F2 is actualy an example.

my need it to have a summery of a group of fields, thus F1,F2....Fn.

i have created a group (via document properties) and add all the fields i need (52)

and tried to sum(GroupName), or sum $(GroupName) or sum(<GroupName>)

but no luck.

can you assist?

moti

Gysbert_Wassenaar

Try this expression: sum(rangesum(F1,F2,...,Fn))


talk is cheap, supply exceeds demand
Not applicable
Author

thanks,

is there a way to do with a loop, like:

for i=1 to 52

sum w(i)

next

Not applicable
Author

Can you please upload your sample application.