DATAEXPORTCOND

The DATAEXPORTCOND calculation command for Essbase specifies value conditions that select export records to be included or marked as "#NoValue" in the export output file.

Syntax

DATAEXPORTCOND "conditionExpression" ReplaceAll;

Parameters

conditionExpression

One or more conditions separated by a logical AND or OR. Each condition specifies a member name the value of which is equal to (=), greater than (>), greater than or equal (>=). less than (<), or less than or equal (<=) to a specified value or the value of another member; for example, "Sales" > 500 AND "Ending Inventory" < 0.

The condition list is processed from left to right. Thus the result of cond1 is calculated first, then the operator (AND or OR) is calculated against cond2, and so on. While processing conditions, if a resultant condition is found to be false, the entire record is omitted from the output file

ReplaceAll

The keyword that indicates whether exported records are to be excluded from the initial export set of records, or included but marked as "#NoValue". The intial export set of records is determined by the region defined by the FIX command and SET commands that apply to the data export.

  • When ReplaceAll is not specified, only those records within the initial export set are exported that meet the specified conditions.

  • When ReplaceAll is specified, all records within the initial export set are exported, but the AND and OR specifications are ignored. All fields that do not satisfy any of the specified conditions are marked as #NoValue.

Notes

Use DATAEXPORTCOND to specify conditions that identify records to be exported based on field values. Whether a condition can specify a member compared to a numeric value or compared to another member depends the member being a row or column element of the output. In order to represent multidimensional data within a two-dimension file, the members of one dense dimension become columns. The combinations of the members of the other dense dimensions and the sparse dimensions create rows. (You can use the DataExportColHeader option of the SET DATAEXPORTOPTIONS calculation command to specify which dimension defines the columns.)

  • If a condition is placed on a column member, the value of the specified member can be compared to a specific value (for example, Sales > 500) or to the value of another member of the same export record (for example, Sales < Cost).

  • If a condition is placed on a row member, the value of the specified member can be compared only to a specific value (for example, Cost < 500).

Example

Not Using ReplaceAll

SET DATAEXPORTOPTIONS 
  { 
  DataExportLevel "ALL"; 
  };
DATAEXPORTCOND (Actual >= 2 AND Sales > 2000 OR COGS > 600);
FIX("100-10","East");
 DATAEXPORT "File" "," "E:\temp\2222.txt";
ENDFIX;

Sets the contents of the initial export file through the DataExportLevel option of the SET DATAEXPORTOPTIONS command and FIX…ENDFIX command. The DATAEXPORTCOND command specifies the records to be included when the Actual value is greater than or equal to 2 and Sales are greater than 2000, or when the Actual value is greater than or equal to 2 and COGS is greater than 600. The conditions are specified on the column Actual, the column Sales, and the column COGS. The exported data includes only records that meet the conditions. Sample output:

"Sales","COGS","Marketing","Payroll","Misc","Opening Inventory","Additions","Ending Inventory"
"100-10","East"
"Jun","Actual",2205,675,227,177,2,3775,2028,3598
"Jul","Actual",2248,684,231,175,2,3598,1643,2993
"Sep","Actual",2012,633,212,175,4,2389,1521,1898
"Jun","Budget",2070,620,180,120,#Mi,2790,1700,2420
"Jul","Budget",2120,620,180,120,#Mi,2420,1400,1700
"Aug","Budget",2120,620,180,120,#Mi,1700,1400,980

Using ReplaceAll

SET DATAEXPORTOPTIONS
{
DataExportLevel "ALL";
DATAEXPORTOVERWRITEFILE ON;
};
DATAEXPORTCOND (Actual >= 2 AND Sales > 2000 OR COGS > 600) ReplaceAll;
FIX("100-10","East");
DATAEXPORT "File" "," "E:\temp\2222.txt";
ENDFIX;

Using the same conditions as the prior example, but including "ReplaceAll" in the DATAEXPORT command, the exported data includes all records specified by the FIX command. #NoValue is inserted for fields that do not meet the specified conditions. Sample output:

"Sales","COGS","Marketing","Payroll","Misc","Opening Inventory","Additions","Ending 
Inventory" "100-10","East" "Jan","Actual",#NoValue,#NoValue,199,175,2,4643,1422,4253 
"Feb","Actual",#NoValue,#NoValue,196,175,3,4253,1413,3912 
"Mar","Actual",#NoValue,#NoValue,199,175,3,3912,1640,3747 
"Apr","Actual",#NoValue,606,204,177,3,3747,1824,3701 
"May","Actual",#NoValue,622,210,177,4,3701,2023,3775 
"Jun","Actual",2205,675,227,177,2,3775,2028,3598 
"Jul","Actual",2248,684,231,175,2,3598,1643,2993 
"Aug","Actual",2245,684,231,175,#NoValue,2993,1641,2389 
"Sep","Actual",2012,633,212,175,4,2389,1521,1898 
"Oct","Actual",#NoValue,#NoValue,196,175,3,1898,1535,1677 
"Nov","Actual",#NoValue,#NoValue,192,175,#NoValue,1677,1584,1553 
"Dec","Actual",#NoValue,#NoValue,200,175,2,1553,1438,1150 
"Jan","Budget",#NoValue,#NoValue,160,120,#Mi,4490,1100,3900 
"Feb","Budget",#NoValue,#NoValue,160,120,#Mi,3900,1200,3460 
"Mar","Budget",#NoValue,#NoValue,160,120,#Mi,3460,1400,3170 
"Apr","Budget",#NoValue,#NoValue,150,120,#Mi,3170,1500,2920 
"May","Budget",#NoValue,#NoValue,160,120,#Mi,2920,1700,2790 
"Jun","Budget",2070,620,180,120,#Mi,2790,1700,2420 
"Jul","Budget",2120,620,180,120,#Mi,2420,1400,1700 
"Aug","Budget",2120,620,180,120,#Mi,1700,1400,980 
"Sep","Budget",#NoValue,#NoValue,150,120,#Mi,980,1300,390 
"Oct","Budget",#NoValue,#NoValue,110,70,#Mi,390,1180,110 
"Nov","Budget",#NoValue,#NoValue,150,120,#Mi,110,1460,60 
"Dec","Budget",#NoValue,#NoValue,150,120,#Mi,60,1300,-260