Serverside Formulas and Formula Filters
The serverside formulas feature allows you to make calculations taking into account all responses collected and not just a single respondent's information. With serverside formulas enabled, you can calculate averages, count responses and more.
Let's see how to use serverside formulas...
Go the the Extra options tab and click Formulas in the Custom scoring section. Now click Create formula and once you've entered your formula, just toggle the serverside button underneath the formula box.
Once the serverside feature is turned on, here are the variables that you'll be able to use:
- response_count - shows total number of responses received for the questionnaire
- total_custom_score_rank_order - the total custom score value ranked from highest to lowest
- qb1_custom_score_rank_order - the total custom score value of the question block, ranked from highest to lowest. You can replace qb1 with a different question block number (qb2, qb3 etc.) if you want to show the results from a different question block.
- f1_avg_result - average result of the formula (you can replace f1 with f2 etc. if you want the results of a different formula. Formula number is shown in the Variable box when you are creating the formula.)
- question_count - shows total number of questions in the survey (including inactive questions)
|IMPORTANT NOTE: These serverside calculations do not work when you preview! You will need to collect a real response in order to test it.|
If you're on the ReportR plan, you'll have the option to add a custom filter to formulas that you've created.
When you create a custom filter, the formula will only calculate the scores for those respondents who meet the filter condition. This feature can be super useful if, for example, you'd like to calculate averages for different departments of your company. Then you would set up a filter that specifies that the answer to question 1 must equal answer 1 "marketing", and then the formula will only be calculated for those people who answered "marketing" to the first question. You can then copy the formula and simply adjust the filter so that each formula will calculate results for people who selected different answer options.
Make sure you have toggled serverside on, then simply click the purple + button to add a custom filter.
The default filter type is based on answers to a particular question. If you'd like to change this, click the arrow to access the drop-down menu of all available filter options, such as date, language and quiz score.
Once you've chosen your filter type, or if you're using the default option of question and answer, choose which conditions need to be met for the formula score to be calculated.
Click Apply when you're done to save your formula together with the custom filters you've set.