I am building an Expense Report, and using Collections for Mileage, Travel, and Miscellaneous, ect... I have a calculation in my Mileage Collect to take the number of miles traveled and multiply by the mileage rate 0.545 to give me the Total Amount of mileage due. (This calculation works) But when I click on ADD to my collection to add a different date and calculate that is divides the calculation in half. And keeps dividing for as many collections I add. So my question is how do I just have a calculation happen for each individual collection?
Question
Question
Calculations in a Collection
asked on June 11, 2018
0
0
Answer
SELECTED ANSWER
replied on June 11, 2018
•
Show version history
You need to use the INDEX function to isolate specific instances of a collection.
Each Variable needs to be wrapped in an INDEX function with the ROW() function, which tells it to use the value from the current "row" of the Collection
For Example,
INDEX(Collection.V_1,ROW())
Then, use that in your calculation instead of just the variable
For Example,
=SUM(INDEX(Collection.V_1,ROW()),INDEX(Collection.V_2,ROW()))
The end result would give you what you want; a standalone total for each collection you add
4
0