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

summing up of values within one row

Hi Folks,

i got a Question, how to summing up of values within one row.

for instance :

Project, Values,

A, 1,2,4,6

B, 3,3,4,9

 

my expected Output is:

Project, Values, Sum

A,  1,2,4,6,  13

B,  3,3,4,9,  19

 

Does anybody habe any idea how to resolve this issue?

Thanks a lot

Beck

Labels (1)
1 Solution

Accepted Solutions
Anil_Babu_Samineni

I can think the best way without problem is

Evaluate((Replace(Values,',', '+')))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

9 Replies
bramkn
Partner - Specialist
Partner - Specialist

[column1]+[column2]+......
beck_bakytbek
Master
Master
Author

Hi B_Knuever,

 

my values are within one row

Edvin
Creator
Creator

You should use SubField().
You can split all the values by "," and then sum all the values. I'm guessing there is an easy solution to this, but maybe mine will help.
For ex.: subfield(Values, ',' ,1) will give you the first number, subfield(Values, ',' , 2) will give you the second

 

bramkn
Partner - Specialist
Partner - Specialist

you mean within one column?
if its always the same number you can use subfield(Values,',',1)+subfield(Values,',',2)+....
if there is not always the same number of values you will need to get the maximum of the values and put a check in like: rangemax(subfield(Values,',',7),0) for example.

SubField(text, delimiter[, field_no ])
beck_bakytbek
Master
Master
Author

Hi Edvin,

 

thanks a lot for your time and helps, i know this function: Subfield(), my Question is, it is possible to solve this issue by using of another function?

 

Thanks a lot

beck_bakytbek
Master
Master
Author

Hi B_knuever,

 

thanks a lot for your time and helps, i know this function: Subfield(), my Question is, it is possible to solve this issue by using of another function?

 

Thanks a lot

bramkn
Partner - Specialist
Partner - Specialist

You might be able to hack it into rangesum().
Anil_Babu_Samineni

I can think the best way without problem is

Evaluate((Replace(Values,',', '+')))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
beck_bakytbek
Master
Master
Author

Anil_Babu

 

thanks a lot for your time and sharing of your experience and for your help, it does look great and work great.

Thanks a lot