I have 2 tables like below
One table has the prices of vehicles the other has the people’s information. I want to be able to calculate the average price needed to given for each person and write it to the average price column.
Side note: for example Mercedes has no price given so I don’t want it to be included in the calculation.
Inside the “For Each” activity, add a “Assign” activity and create a new variable called “sum” of type “Double”, and use the following expression to add the value of each cell in the current row to the sum: sum = sum + CDbl(row(column))
After the inner loop completes, add a “Assign” activity to calculate the average by dividing the sum by the number of columns, and store the result in a variable called “average”. Use the following expression: average = sum / row.ItemArray.Length
I want to be able to find the average price of the vehicles for each person.
For example: James Booker, BMW, yamaha and bianchi. I check the price table and see car: BMW is 50 motorcycle: yamaha is 18 and bike: bianchi is 4 average is 24.
I am getting the following error on Assign: Cannot create an L-value from the given expression with property ‘set_Item’ because the target object is null.
when im trying to parse and add to the dictionary.