Aim: To create categories for a particular data set.
Example: You have demographic data, including details on age and need to create categories on age group.
Data: The image below shows a table with three columns for country, age and a unique id.
1. In the ElastiCube Manager create a new custom field in the table to categorize the age data. Right click and name it 'Age Group', and make sure the field is of type 'text'. Click the link for more details on custom fields.
2. Right click the custom field and click edit next to the expression. A SQL Case statement is needed to create the category.
When age between 0 and 18 then '0 to 18'
When age between 19 and 30 then '19 to 30'
When age between 31 and 50 then '31 to 50'
When age between 51 and 65 then '51 to 65'
When age > 65 then '65+'
3. In the top right click the tick icon to make sure the SQL statement is correct and if so click 'Save and exit'
4. In the top of the ElastiCube Manager click ElastiCube icon>Build ElastiCubes>Build Scheme Changes.
5. The Age Group field can be used to categories ages across countries.