# Adding the total amount of fields based from categories?

**peternasser**Hi, first i would like to say , that you really doing great job on jotform, and thank you for your support forum.

second, sorry if i make mistakes in English :) but i hope to communicate my problem.

in your templates i found a reimbursement form that i customized to my needs but i am in a need of help to complete it.

here is my form: http://www.jotform.com//?formID=50503684313954

i need that the form to summarize the amount of each category that the employee chose from the drop down field.

for example: if employee submitted 5 receipts, 2 receipts are from category 1 and 3 receipts from category 2 that the form will show me something like this:

category1 : 2 receipts , (total amount in category)

category 2: 3 receipts, (total amount in category)

I hope you can help me. thank you in advance

Peter

- JotForm Support
**Charlie**Hi,

I'm not sure if I understand your question completely, do you wan to have a total amount for each category that you have? I see that you have a one total amount field? You can probably add a dropdown option beside it so that you can set which total you would want to see. After that, you can try using our Conditions function, to know which ones to add: http://www.jotform.com/help/57-Smart-Forms-Using-Conditional-Logic

You could also check this guide on how to perform calculation using the Form Calculation widget: http://www.jotform.com/help/259-How-to-perform-calculation-in-the-form

I hope this helps. Do provide us more details of the problem if I misunderstood it.

Thank you.

**peternasser**Hi Charlie

Yes, I have a total of all the amounts that the user will input which that is good, what i would like to do , is to break down the amounts into the categories that i have in the drop down example :

i have category named: 741-Airfare

and another one called: 841-Bank

etc

so at the end, I would like to see how much amount is in each category

how do i let the form check if the category in each raw and add the total of each category to a field?

I hope this is more clear , if not, I will make a basic form to show what i need.

Thanks

**peternasser**I have created a simple form to show what i mean

http://www.jotform.com//?formID=50533994887977

let me know if this is clear

- JotForm Support
**Charlie**Hi,

Thanks for giving us more information. I'll create a demo form and a quick guide right now, I'll then share it but I'll need a couple of hours. I'll get back to you later this day.

Thank you.

**peternasser**Thank you so much

- JotForm Support
**Charlie**Hi,

Here's the demo form based from the sample for that you have: http://form.jotformpro.com/form/50534106700947?

First, we will need to insert the values in the amount field to the specific text boxes, depending on the category chosen. Here are my conditions:

Then for each of the Form Calculation wizard for each total option, we will add all the text boxes, example is the category for option 1.

Choose the text boxes and add them all together.

You can clone the edited form using this guide: http://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL

I hope this helps. Do let us know if you need more information on this.

Thank you.

**peternasser**Thanks, I got the idea that you did it and it is good, and I am starting to do it in my form. but I have 17 categories with 25 raw, so it really create for me such a long long lists of boxes.

I wounder if there isn't really a shorter way to do it in the calculation fields?

like to say

if category 1#1 = to X

then Total Categroy 1 = {amount1}

if category 1#2 = to x

then Total category 1 = {amount2} + {total category 1}

so then if the first raw met the condition and is calculated to the total amount for the category then the seconed raw if it meets the condition it just adds to the total that we have.

is there a way to do it like this ? or i really need to do all the 17 categories X 25 raws?

Thanks alot

- JotForm Support
**Charlie**Hi,

I was looking for a way to just append or add amounts depending on the selected category option, but unfortunately I can't seem to find a more efficient or easy way. You could still hide the text boxes and the format and styling of your form will still remain. Here's how you can hide it.

I suggest that you add them at the bottom so that you can organized them and won't be confused.

I'll try to look at another way, but for not this the one way to do it.

Thank you.

**peternasser**ok , thanks

**Ben**In my colleague's name, you are welcome. Do let us know if you have any further issues or questions and we would be happy to assist.

**peternasser**Hi again

I have followup question and maybe more complected on the same form , i really need to have the output that way to make it work for our company.

now i need to summarize the totals according to the fund and categories, here is what i mean.

i need at the end that the form show me the total amount for the fund:

Total category 1 _the total ___

total of Fund : _1234____ (this can be any number)

(if category 1 contains differant fund it will show me it in another field)

Total category 1 __the total___

Total of fund: __5678__ (this can be any number)

(category 1 can also contain another different fund that 123,5678, if so it will be )

Total category 1 __the total ___

Total fund:__

_91011__Category 2 : __the total amount__

fund: ___1234___

and so on ....

I hope this is clear enough , i added the fund field in the sample form that you worked in before if this is not clear, or if you need me to explain it in another way , let me know.

thank you so much for your help

**Sean**I have moved your latest post entry to http://www.jotform.com/answers/524430 where it will be addressed in details. This issue would be considered different from your initial issue and to avoid confusion a new thread was created for it. You can follow the link provided above to keep track of all the updates re that issue.

Thanks