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. Depending on the type of analysis you want to do, it might be useful to 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, if you want to define three age groups in households, you use the following definition:
1|30|Young
31|55|Middle-age
56|105|Old
Filter
Defines or uses an existing domain to filter the data set in the table.
How to create numeric ranges
1 In Main file, choose New. The list of transformation instructions appears.
2 In the list of transformation instructions, select INUMERIC. Numeric ranges appears, as shown in Figure 5‑20.
Figure 5‑20 Creating numeric ranges
3 In Source column, 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 Column, type the name of the new numeric range column.
5 In Ranges, define the ranges and their names. Double-click in the box to open the text editor and type the text.
6 In Numeric ranges, choose OK. The INumeric instruction appears in Main file, as shown in Figure 5‑21.
Figure 5‑21 Creating an INumeric instruction
7 Choose Save to save the project.
8 Run the instruction.
1 In Main file, select each instruction and then, -, to make it inactive, as shown in Figure 5‑21.
2 In Data—Options, deselect Load, as shown in Figure 5‑22.
Figure 5‑22 Deselecting Load
3 Choose Run. As the project runs, messages describing each stage of the project appear in Running project, as shown in Figure 5‑23.
Figure 5‑23 Running the INumeric instruction
9 Validate that the new column was created in Explorer in Data Management.