# Formulas "including all responses" and Formula Filters

Formulas including all responses | Essential | Professional | Enterprise | ReportR | ||||

Formula filters | Essential | Professional | Enterprise | ReportR |

## Formulas including all responses

The feature to calculate **formulas including all survey responses **allows you to make calculations taking into account all responses collected and not just a single respondent's information. Enable this feature so that you can calculate averages, count responses and more.

Let's see how to do this...

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 button underneath the formula box to **include all survey responses in this formula calculation**.

Once you've turn on the feature to include all responses in formula calculation, 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 1

The formula calculations **including all responses** do not work when you preview! You will need to collect a real response in order to test it.

#### IMPORTANT NOTE 2

Whenever you copy a survey, the 'including all responses'-formulas **will NOT be copied with it.** You will need to set up these formulas independently for each survey you create.

Formula Filters

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 turned on to **include all survey responses in this formula calculation**, 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 **Save Changes** when you're done to save your formula together with the custom filters you've set.