# Offer / Filter .. advanced feature

Filter / Calculations function

We'll show you how to use the Filter / Calculations section for the Offer window. For both home and guests, three independent calculations can be obtained according to the defined calculation definition. The calculation refers to the last matches of the given team. The number of matches to be considered is defined by the "Matches" item in the following section of the Filter / Calculation section:

At the top of the Calculations section, the EDIT button is available. This allows you to display a window for creating and editing calculation rules. The upper part of the window serves to manage the definition of the calculation definition. Use the CLEAR button to delete all defined rows at once.

The definition of the calculation consists of one or more lines which determine under what conditions the value should be added to the result. The value from a given row is added to the result only if all the conditions on that line are met. If the conditions are met on multiple rows at one time, the result is added to the result from each such line.

Conditions can be defined by activating fields in individual columns. What value should be added when the conditions are met is determined in the "TO ADD" field: it is still possible to determine how many times the determined value should be added.

A few samples:

In this figure, MAXIMUM is active at the bottom. This means that the maximum value (as a result of the whole calculation) is returned from a single line for all the matches being explored. In the image, the maximum odds for a given team will be returned from the matches they have won (column + = - contains + .. which means the row is evaluated if the team won the match). Matches could be played both at home and outside (the * / D / V column contains the value *):

The next figure captures the definition of the calculation, when the difference is added to the result depending on the win / draw / loss and the other in the home and the outside. For example, for a away draw result, the value of 7 is added.

The following figure captures the calculation based on the goals difference in the previous matches. The difference of the goals is always calculated from the point of view of the given team, ie the difference is negative in the case of a loss. The calculation is defined so that, for example, when winning away, the result is added to 1.5 times the goals difference. Similarly, when the home team lost the match, it is also calculated as 1.5 times the difference of goals (ie, the result of the calculation is reduced, or the difference in the goals is negative). The average is returned (see option at the bottom) calculated for all matches where at least one specified condition has been met.

In order for the Calculation values to be available in the Offer window, new columns must be activated in the Filter / Columns section. For each calculation two column are available: withs the calculation result itself and the number of matches where at least one specified condition is met.

If we apply the above filter in the Offer window we get:

The match Buffalo - Calgary has visible the match details: recent home team matches. So we can check the calculated values from our filter:

- the average score from recent 5 matches: the very recent match was finished in OT - according to our definition this match is not used into our calculation. The average is counted from the other four matches. There is 1-goal home victory: we get the value 1.0 * 1. Then Buffalo has won away for 2 and then for 4 goals. So we get 1.5 * 2 + 1.5 * 4. The last match was the away loss for 4 goals .. so we get 1.0 * (-4). The result is: 1 + 3 + 6 - 4 = 6. The result 6 is stated correctly at the first new column with defined calculation at the Offer window. The next column contains the value 4 which announces how many matches were used to calculate the first result: 4 matches,
- the second calculation for the home team: a static value is added to the result (without any correlation to any stats or ie the odds). The static value is defined according to the result home / away during recent 5 matches. The default value is 100. The overall result of the calculation is decreased to its 95% at every calculation step (= for each match) which means the older matches have lower importance. The oldest match (= recent 5th match) Buffalo lost away. From the basic value 100 is deducted the value 8 which gives the result 92. For the 4th match we must increase this value to its 95%, so we get 87.4. The 4th recent match Buffalo won away, so we add 13. The result is 100.4 and 95% is 95.38. The 3rd match: again the away victory. So adding 13 gives the result 108.38. 95% is then 102.961. The 2nd recent match: the home victory, so adding 10 = 112.961. 95% is 107.31295. And finally the very recent match: an away tie .. so adding 7 and the final result is 114.31 .. which is correctly displayed at the Offer window at the third new column (the other new column contains the value 5 as there were used all 5 recent matches for the calculation),
- the third calculation for Buffalo searches for the highest odds for Buffalo during its 10 recent matches when Buffalo has won. (please notice: when searching for the matches always as the maximal limit is taken the number of days entered at Filter / Settings section .. so 10 recent matches needs to be within that limit). The returned value is 3.62 from the away victory over Los Angeles.