Calculations with a Matrix

  • spfcorreduria
    Asked on September 13, 2016 at 10:13 AM

    https://form.jotform.com/62563496074968

     

    Hello

    My form does the following calculation now = 

     

    Sub-Total-1 = Income * Activity 1 Factor % * Activity 1 % 

     

    where income is a € value and "Activity 1 Factor %" is a variable like 0,2 and "Activity %" is the percentage that the activity represents of the user business operations. for example the user might have 40% of its activity in architecture and 60% of the activity in design

    I would like to be able to sum at Sub-Total-1 several activities instead of just one, something like these =

     

    Sub-Total-1 = [ Income * Activity 1 Factor % * Activity 1 % ] + [ Income * Activity 2 Factor % * Activity 2 % ] ...

     

    Can you help me? 

     

    Thank you

     

  • Chriistian Jotform Support
    Replied on September 13, 2016 at 1:14 PM

    I am currently checking your form. Please give me sometime to further investigate the issue. Will get back to you as soon as I get a result. Regards.

  • spfcorreduria
    Replied on September 13, 2016 at 1:17 PM

    thank you i have a new version more clear

     

    https://form.jotform.com/62563711459965

  • Chriistian Jotform Support
    Replied on September 13, 2016 at 1:45 PM

    Thanks for giving me the updated form. I checked the form and I noticed that the Activity Factor % field is missing in the updated form.

    Old Form: https://form.jotform.com/62563496074968 

    Calculations with a Matrix Image 1 Screenshot 60

    New Form: https://form.jotform.com/62563711459965

    Calculations with a Matrix Image 2 Screenshot 71

     

    I checked the form and I noticed you are using condition to calculate the value for Sub-Total-1. 

    Calculations with a Matrix Image 3 Screenshot 82

     

    I think it is best to use the Calculation Widget instead of setting the calculation using conditions. To add a Calculation Widget to your form, just search the widget in the More Fields Tab.

    Calculations with a Matrix Image 4 Screenshot 93

     

    Once you have added a calculation, you can set the formula directly to the field using the Widget Wizard.

    Calculations with a Matrix Image 5 Screenshot 104

     

    For more information, you can check this article: How to Perform Calculation in the Form. You can also check this sample cloned form that I have created: https://form.jotform.com/62565754642968. You can also clone the form to have a closer look on the setup: How to clone an existing form from a URL.

     

    Do let us know if you have any further questions.
    Regards.

  • spfcorreduria
    Replied on September 13, 2016 at 2:08 PM

    thank you i will try that and yes sorry i have been updating the form

    the latest form working fine is https://form.jotform.com/62563711459965

    still i would like to be able to find a solution to calculate all activities together instead of the sum of activity 1 + 2 + 3 ...

     

    thank you

  • Welvin Support Team Lead
    Replied on September 13, 2016 at 3:03 PM

    I think you can calculate the values into one calculation widget. Just add them using a correct syntax, using parenthesis to group each activity. You can look for my colleague's calculation. 

    Please let us know if you require additional assistance on this matter.

  • spfcorreduria
    Replied on September 14, 2016 at 9:46 AM

    hello i think i might not have explained myself ver well. what i am looking for is a table where the user can easily write the % of business in each activity and later on the form will calculate all. i know how to calculate them all. what i do not know is how to show them all together without the need to design a single box for each activity like i have now.

     

    the table would be like this (developer view)

     

    Calculations with a Matrix Image 1 Screenshot 30

    and this is how the user will see the table

     

    Calculations with a Matrix Image 2 Screenshot 41

     

    this is my form today https://form.jotform.com/62563711459965

  • Chriistian Jotform Support
    Replied on September 14, 2016 at 11:26 AM

    Hi,

    As far as I understand, you need to have a table in your form where users can input values in the cells. You also need to have calculations in the fields. Have you already taken a look at our Matrix field?

    Calculations with a Matrix Image 1 Screenshot 20

    I am afraid you will need to redo your form, though. I am trying to come up with a demo form but for now, can you please confirm that it is what you need the form to look like?

  • spfcorreduria
    Replied on September 14, 2016 at 11:41 AM

    i will try that thank you and get back to you. in answer to your question:

     

    yes i need a table but the USER will NOT be able to see the column WEIGHT nor the calculation only the activity and % the user has to write something like this = 

     

    Calculations with a Matrix Image 1 Screenshot 20

  • BJoanna
    Replied on September 14, 2016 at 1:05 PM

    Thank you for providing us additional info. I will check with my colleague, to see if he has created demo form for you. 

    You can also check our Spreadsheet widget.