Crosstab Nodes and Crosstab Node Members
Crosstabs are dimensional objects that have row edges and column edges. Each edge is composed of a set of crosstab nodes. Each crosstab node contains the following:
- One or more crosstab node members.
- Zero or one nested crosstab node, which contains one or more crosstab node members or nested crosstab nodes.
Each crosstab node member refers to a data item that contains an expression to define the members in the crosstab.
The following crosstab contains four crosstab nodes.
1 Crosstab node 1 contains a single
node member for the total. This node refers to the data item Total(Product
line)
.
2 Crosstab node 2 contains a crosstab
node member that refers to the data item Product line
.
This member has a nested crosstab node containing a crosstab node
member that refers to the data item Product type
.
3 Crosstab node 3 contains a single
node member for the average. This node refers to the data item Average(Product
line)
.
4 Crosstab node 4 contains a crosstab
node member that refers to the data item Order year
.
This member has two nested crosstab nodes. The first node contains
a crosstab node member that refers to the data item Order
month
. The second node contains a crosstab node member for
the total. This node refers to the data item Total(Order month)
.
Moving Crosstab Nodes
Crosstab nodes can be placed anywhere in the crosstab. For example, in the previous diagram, you can drag Order month under Average to create a row edge.
To move nested items from one edge to another, ensure that you select the crosstab node and not the crosstab node member. For example, in the previous diagram, you want to move Product line and Product type to the column edge. To do this, click Product line and, in the Properties pane, click the select ancestor button and click Crosstab Node. Both Product line and Product type are selected.
Crosstab Node Creation Option
The IBM® Cognos® Analytics - Reporting option Allow crosstab nesting beside individual items (More icon , Options, Edit tab) affects the drag-and-drop behavior in crosstabs. When the option is turned on and you add a data item to a crosstab, the item is created as a crosstab node. In addition, you can nest items under individual items instead of only on the entire crosstab edge. If the option is turned off, the item is created as a crosstab node member to an existing crosstab node.
For example, in the previous diagram, if the option is turned on and you drag Country or Region from the Sources tab to beneath Product line, Country or Region becomes a new peer node to Product line. If the option is turned off, Country or Region becomes a new peer node to Product line and has Product type as a nested crosstab node. This happens because instead of adding a new node, you are adding a new member to the existing node that already contains Product line.