The goal of this practice is to check which of the invoices in an Excel file were issued to clients in bankruptcy and calculate the sum of the invoices to be recorded as loss.
I was able to get the data from the two excel files and use the Join Data Tables and Filter Data Tables Activity. After that, I was using a For Each Row and I was going to create a new variable for the total loss.
The solutions said the following:
To calculate the loss from the companies that are bankrupt, loop through the rows in the filtered Data Table and add the content of the “InvoiceValue” column, converted to Integer, to a variable in which we will store the sum - “TotalLoss” of Integer type. Use a ‘For Each Row’ and an ‘Assign’ activity in the Body with the following method: TotalLoss = TotalLoss+Cint(row(“InvoiceValue”));
I don’t understand how we can use TotalLoss = TotalLoss + something else? Can someone clarify this for me?