Assigning a price for each item and calculating them at the end

Dears,
I need your help.
I have a variety of items that I will conclude in a multi-response question.
I want to assign a price for each item and let kobo calculate the value multiplied by the purchased quantity for each item automatically.

Please it’s urgent.
Thanks in advance

Welcome to the community, @maamoun96_m! Maybe this is something you are looking at that should solve your issue which has been discussed in our previous post:

Hello dear,
First of all, thank you for your reply.
Unfortunately, it is not working, as each product has a price and quantity related to it. the first question is multi response question, it includes all the products, for example, if you choose product 1, 2 questions will appear, product 1 price and product 1 quantity, also a product 1 calculation question will appear which is releated to the product 1 and it calculates (product price * product quantity).
Please look at the attached files in the below drive link so the idea would be more clear.
https://drive.google.com/drive/folders/1I_AMfaTFp_g1WX_gvn0SROtxXH2BGVhM?usp=sharing

@maamoun96_m, try this, this should solve your issue:

In the survey tab of your xlsform:

In the choices tab of your xlsform:

image

Data entry as seen in Enketo:

Reference xlsform:

a53Cefm5esemXTYMRTMPRr.xlsx (11.7 KB)

Note: Have a look closer at the if-statement. I have removed the ' from the calculation expression that solved the issue.

1 Like

I don’t how to thank you, you really saved me.
Thanks a million brother.

2 Likes