QUANTILE
A quantile range dynamic column is created from a numeric column. QUANTILE creates groups that contain the same number of values. These groups are created by sorting the values in ascending order so that the first range contains the smallest values and the last range contains the largest values. For example, you can identify customers that generate the greatest profit.
A Quantile instruction must have the following syntax:
Syntax
QUANTILE [Source column] [Target column] [Number of parts] ([Filter])
Parameters
Source column
Defines a numeric column.
Target column
Defines the name of the new target column.
Number of parts
Defines the number of parts the data must be grouped into.
Filter
Defines a domain, if the data requires filtering.
How to create a quantile range column
The following example describes how to create a quantile column that creates four groups that span the range of credit limit values found in a set of customer records. Table 5‑6 lists the resulting quantile ranges and the number of customer records in each range.
Table 5‑6 Quantile ranges
#
Credit limit range
Number of records
1
0-41900
31
2
43300-77000
31
3
77000-95100
30
4
95400-222600
30
1 In Main file, choose New. The list of transformation instructions appears.
2 In the list of transformation instructions, choose Quantile. Quantile appears, as shown in Figure 5‑30.
Figure 5‑30 Creating a quantile column
3 In Source column, select a database, a table, and a numeric column.
4 In Column, type the name of the new column.
5 In Number of parts, provide the number of quantiles, groups, or ranges that the column will contain.
6 In Filter, select Click to select define a domain, if you need to filter the data.
7 In Quantile, choose OK. The Quantile instruction appears in Main file, as shown in Figure 5‑31.
Figure 5‑31 Creating a Quantile instruction
8 Save the project.
9 Run the instruction.
1 In Main file, select each instruction and then, choose - to make it inactive, as shown in Figure 5‑21.
2 In Data—Options, deselect Load, as shown in Figure 5‑32.
Figure 5‑32 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‑33.
Figure 5‑33 Running a Quantile instruction