The put statement is used to set some numeric value in the hypercube.
Access to the columns can be done by labels. You can also access columns and rows by declaration order. See the examples below for more details.
Syntax:
putcolumn(position)=value
Example 1:
Access to the columns can be done by labels.
This example will set a value of 1 in the first position of the column labeled Sales.
Put Sales(1) = 1;
Example 2:
You can access measure columns by declaration order using the #hc1.measure format for measures.
This example will set the value 1000 in the tenth position of the final sorted hypercube.
Put #hc1.measure.2(10) = 1000;
Example 3:
You can access the dimension rows by declaration order using the #hc1.dimension format for dimensions.
This example puts the value of the constant Pi in the fifth row of the third declared dimension.
Put #hc1.dimension.3(5) = Pi();
Information noteIf there are no such dimensions or expressions, in value or labels, an error is returned indicating that the column was not found. If the index for the column is out of bounds, no error is displayed.
A measure is a calculation base on one ore more aggregations. For example, the sum of sales is a single aggregation, while the sum of sales divided by the count of customers is a measure based on two aggregations.
A dimension is an entity used to categorize data in a chart. For example, the slices in a pie chart or the bars of a bar chart represent individual values in a dimension. Dimensions are often a single field with discrete values, but can also be calculated in an expression.
A dimension is a dataset in a data mart that forms part of the star schema. Dimension datasets hold the descriptive information for all related fields that are included in the fact table’s records. A few common examples of dimension datasets are Customer and Product. Since the data in a dimension dataset is often denormalized, dimension datasets have a large number of columns.