|
Add a column to the cube.
When you press the
Add or Edit
b utton in
section Select fields
from database , we get to the following
dialog:
In the upper section, we can see a list of
fields that can be used in the cube. The fields in the
list are:
- Owner: Table owner used in relational
databases.
- Table: Table name in the database.
-
Table alias : Table
name. Usually is the same as the table name.
-
Column: This is the
field that will be read from the database.
- Type: Field type or kind of data that is kept in
the field. It can be one of the following:
Char, Date or
Number.
The options you can fill in this dialog
are:
-
Field's text: You can type here the field
to query or write a database formula here. Write Char
or Date
constant values between single quotes ', like in: 'Abracadabra'. Double click in the
fields list to insert a field in the text. In the image above, the field
was selected, meanwhile the rest of the text was typed.
You can use any valid database formula that your database permits.
Consult your database formula to obtain more
information.
-
Formula: Depending on the database type
you will use, a list of the
database's functions that can be used to create new fields in the
database query will be show. See section Database
formulas to obtain more information.
-
Alias : This is an
unique name that you assign to the field and is used internally.
-
Field's
type : When you choose a database
field, its type is assigned to this new field. If you are typing
a formula, you must chose the resulting field type. For example, a difference
in days between dates give a numeric type and not a date type. You can
use one of the following types:
-
Char : This field can
contain sequences of zero or more characteres.
-
Date : Only dates can be
assigned to this field.
-
Number : Only numbers can
se assigned to this field. This field can be added, subtracted,
etc.
-
Aggregate function: If you wish to
summarize your data, you need to use aggregation functions. For example,
to obtain the total amount of purchase from each customer and each
producto without seeing the invoice detail, you can apply an aggregate
function to the amount. For numeric field types you can apply all
aggregate functiones, for character and date field types, you can't
apply the Sum and Average functions. This functions are:
-
-
None
: None aggregation function is applied.
-
Count
records
: Count records for each group of records. For example, if
a customer purchased ten times a product, the number is ten
-
Sum: Adds the values
of this fields as related to the rest of fields of the query.
-
Average: Averages the values
of this fields as related to the rest of fields of the query.
-
Max
: Obtain the greatest value from a group of records.
For example, last invoice date of a customer, or biggest purchase of a customer.
-
Min: Obtain
the smallest value from a group of records.
Note: Even thou the cube summarizes
the information, it is not need to summarize your
data in this stage of cube definition.
Press Next to choose the field and
Cancel to exit the dialog without choosing
it.
|