Question: I'm trying to split a number say TotalRecords in a given range intervals of say 'X' and round the last item to the nearest range 'X'

Example:

```
'X' Range = 50
TotalRecords = 120.

```

What i'm expecting is 50,100,150 (120 is rounded to the last range).

Answer: 
I would just create multiple report parameters that are dependent on each other.
First parameter is continent (e.g. Europe). The 2nd parameters would be region (europe1, europe2, baltics...), and the 3rd would be the country. The list of values in your 2nd parameter you can make dynamic based on what has been selected in the first parameter. And the same for the 3rd parameter. 

To define the hierarchy between them you can create a table in your database (table with 3 columns).
I have found a way through the query/procedure:

`WHERE ((@area = 'ALL EUROPE EXPORT' and a.Area in ('Baltics', 'Europe 1', 'Europe 2', 'Europe 3', 'Europe 4', 'Europe 5')) or (@area = 'LITHUANIA' and a.Area = 'Lithuania') or (@area = 'BALTICS' and a.Area = 'Baltics') or (@area = 'EUROPE 1' and a.Area = 'Europe 1') or (@area = 'EUROPE 2' and a.Area = 'Europe 2') or (@area = 'EUROPE 3' and a.Area = 'Europe 3') or (@area = 'EUROPE 4' and a.Area = 'Europe 4') or (@area = 'EUROPE 5' and a.Area = 'Europe 5') or @area is null)`

And then in parameter values I added all those upper case names.