INUMERIC
Using numeric ranges, you can create a dynamic column that groups values into numeric ranges. A numeric range must be based on a numeric column. Numeric ranges are useful for simplifying data. For example:
*There is a column in the database containing profit per order. You can group these figures into five intervals such as very high, high, medium, low, and very low.
*Another very common case is grouping individuals into age ranges. These ranges tend to be very different depending on the type of analysis you want to do, and so being able to configure the ranges manually gives you the flexibility you need.
An INumeric instruction must have the following syntax:
Syntax
INUMERIC [Source column] [Target column] [Bands] ([Filter])
Parameters
Source column
Defines a database, table, and column for a source for the numeric ranges. The column must be of numeric type.
Target column
Defines the name of the target column. The column is added to the source table.
Bands
Defines the ranges in the following format:
[Lower range number]|[Upper range number]|[Range Name]
Each range must be on a separate line. The lower and upper numbers define the numbers to include in the range. For example, to define three age groups in households, you use the following definition:
1|30|Young
30|55|Middle-age
55|105|Old
Filter
Defines or uses an existing domain to filter the data set in the table.
How to create numeric ranges
1 In the Transform tab, choose “New”. The list of transformation instructions appears.
2 In the list of transformation instructions, select INUMERIC. the Numeric ranges screen appears, as shown in Figure 5‑19.
Figure 5‑19 Creating numeric ranges
3 In the Source column fields, select a database, a table, and a column that will be used as a source for the numeric range column. The column must be numeric.
4 In the Column field, type the name of the new numeric range column.
5 In the Bands field, define the ranges and their names. Double-click in the box to open the text editor and type the text.
6 Click “OK” to confirm your choices and go back to the main Transform tab screen. The INUMERIC instruction appears in Main file panel.
7 Save the project.
8 Run the instruction without loading data.
1 In the Main file panel, select each instruction. Then select the (-) icon, to make each one inactive.
2 Remove the selection from the Load option in the Data tab, as shown in Figure 5‑20.
Figure 5‑20 Removing the Load option
3 Click on the Run tool at the top of your project page. Then select “Yes’ in the confirmation screen that opens.
As the project runs, messages describing each stage of the project appear in Running project, as shown in Figure 5‑21.
Figure 5‑21 Running the INumeric instruction
9 Verify that the new column was created in Explorer in Data Management.