Hello,
I'm trying to create an expenses claim process using MS Forms and power automate.
My form gives the user, depending on how they answer the question, the chance to add a maximum of 10 expense lines in one form submission.
My issue: each expense line gives the user a question to share how many miles and at what rate they are claiming. For example, 10 miles, at rate £1.25.
In my flow, i want to calculate the Miles multiplied by the Rate to give a total amount but because the user 'COULD' answer this 10 times by adding more expense lines, i need power automate to calculate this for each expense line and then at the end add all of the totals together.
Also as sometimes the answer in the form could be blank as they may only do 5 expense lines, i need ensure if the question is empty then to treat the value as 0 - hope that makes sense.
The only way i can see to do this the below (Initialize variable, then set the variable, then compose to multiply) however this feels like a really really long winded way of achieving this as id have to initialize x10, set var x10, multiply x10 and then add all the mutiplied numbers together, so looking at 31 actions before the flow even gets going properly.
Expression used for set var:
int(if(empty(outputs('Get_response_details')?['body/ra41978102e8d4119b59fdcd535a84e02']), 0, outputs('Get_response_details')?['body/ra41978102e8d4119b59fdcd535a84e02']))
Before i proceed, can anyone recommend a more simple way?

Any help appreciated!