Using arithmetic ( addition) in a graph

Hello - I am a beginner here and I have a question. I am building a graph for a flat file. In this file I have eight columns that I need to add together if the ‘source code’ match. For example - I have the following

Src1 = A SrcAmount1 = 1000.00, Src2 = P SrcAmount2 = 100.00, Src3 = A SrcAmount3 = 100.00

I would need to add Src A together for a total of 1,100.00. I have eight Src codes and eight corresponding SrcAmounts in one row. I have several rows but only need to look across one row at a time.

I am not sure how to code this in the graph

Thank You

Hi,

The structure of the file prevents direct addition of the SrcAmount values. Each column contains too much information. You need to separate the Src from the SrcAmount. This can be done in a Reformat component using string functions like replace() and split(). I attached an example graph, where you can find the Reformat component (renamed to Parse & Count in this example) which contains commented code (in the Transform property). Output of this component is the result of the addition.

ua_test.csv
Hope this helps,