Cube DataareaDefine

Creates a structure-driven or data-driven data area or a combination of both.

The data area defined by Cube DataareaDefine is invalidated when the user session ends or by calling any data area function, including Cube DataareaDefine itself.

Request

<Alea:Document xmlns:Alea="http://www.misag.com">
  <Alea:Request RequestID="001" Class="Cube" Method="DataareaDefine">
    <Alea:DataArea Cube="SALES" NonExistentCellSuppression="true" UseOnlyBasicElements="true">
      <Alea:DimFilter Dimension="Level">
        <Alea:Element Name="IFRS" />
        <Alea:Element UName="[Level].[HGB]" />
      </Alea:DimFilter>
      <Alea:DimFilter Dimension="Profit" />
      <Alea:DimFilter Dimension="Version">
        <Alea:Subset Name="Planable" />
      </Alea:DimFilter>
      <Alea:DimFilter Dimension="Time">
        <Alea:BaseElements />
      </Alea:DimFilter>
      <Alea:DimFilter Dimension="Unit">
        <Alea:ConsolidatedElements />
      </Alea:DimFilter>
      <Alea:Condition Operator="GT">                               
        <Alea:Value>0</Alea:Value>
      </Alea:Condition>
      <Alea:Condition Operator="LT">                               
        <Alea:Value>100</Alea:Value>
      </Alea:Condition>
    </Alea:DataArea>
  </Alea:Request>
</Alea:Document>

This table describes the attributes of the <Alea:DataArea> XML element:

Attribute Value
Cube This attribute specifies the cube name.
UseOnlyBasicElements This attribute specifies the type of cells to include.

False: cells of any type are used (base, calculated, string).

True: calculated cells (on all levels, rule-calculated base cells as well) are not considered.

This attribute is required.

NonExistentCellSuppression This attribute specifies if empty cells are included in the respective query. It can be true or false. A special case is that a string cell can contain an empty string. This is not the same as an empty cell.

This attribute is required.

Answer

<Alea:Document xmlns:Alea="http://www.misag.com">
  <Alea:Request RequestID="001">
    <Alea:Return />
  </Alea:Request>
</Alea:Document>

Error

<Alea:Document xmlns:Alea="http://www.misag.com">
  <Alea:Request RequestID="001">
    <Alea:Error ErrorID="error_code"/>
  </Alea:Request>
</Alea:Document>

Structure options

The structure-driven part of the Cube DataareaDefine function is defined using <Alea:DimFilter> XML elements. The use of alternate hierarchies is supported.

To ask for all elements from the default hierarchy, use:

<Alea:DimFilter Dimension="Dim"/>

To ask for all elements from a specific hierarchy, use:

<Alea:DimFilter Dimension="Dim" Hierarchy="Hier"/>

<Alea:ConsolidateElements /> and <Alea:BaseElements /> can be used to address the consolidated respectively the base elements of the default hierarchy. To address the elements of another hierarchy the Hierarchy attribute must be added to the tag.

To ask for consolidated elements from the default hierarchy, use:

<Alea:DimFilter Dimension="Dim">
  <Alea:ConsolidatedElements />
</Alea:DimFilter>
To ask for base elements from a specific hierarchy, use:
<Alea:DimFilter Dimension="Dim">
  <Alea:BaseElements Hierarchy="Hier" />
</Alea:DimFilter>

To ask for single elements from specific hierarchies, use:

<Alea:DimFilter Dimension="Dim">
  <Alea:Element Name="Elem1" Hierarchy="Hier1" />
  <Alea:Element Name="Elem2" Hierarchy="Hier2" />
</Alea:DimFilter>

Data options and value conditions

The data-driven part of the Cube DataareaDefine function is defined using up to two <Alea:Condition> XML elements. Only cells with values that comply to the given conditions are included in the data area. In the example request, only cells with values that are greater than 0 but less than 100 are considered.

The supported operators are:

  • GT - greater than
  • GE - greater than or equal
  • EQ - equal
  • LE - less than or equal
  • LT - less than
  • NE - not equal