Cognos TM1 rules editor
Using the rules of TM1, you can do the following.
- To calculate totals based on business rules, perform multiplication of cells.
- Override automatic consolidation of TM1 when necessary.
- Using data in one cube to measure or exchange data between cubes in another cube.
- Allocate the same values for multiple cells,More info go through Cognos tm1 course Blog.
Cognos TM1 rules editor
If you try to use the Rules Editor while .Net 3.5 SP1 is not properly enabled, errors can occur.
You may use TM1 Server Explorer to access the Rules Editor. Right-click on the cube (the cube for which you want to define a rule) and select Build Rule from the menu If there are no rules associated with this cube already.
If one or more rules already exist for this cube, you can pick Edit Rule.
Upon saving the rules file, TM1 rules are compiled one by one.
When it finds the first rule compilation error, TM1 ceases compiling rules.
Compilation of Cognos TM1
For instance, you would perform the following steps if there were three compile errors:
- Only press Save.
- Compile error is triggered by TM1 (1st error encountered).
- Get the error fixed.
- Only press Save.
- Compile error is prompted by TM1 (2nd error encountered)
- Get the error fixed.
- Only press Save.
- Compile error prompted by TM1 (3rd error encountered).
- Get the error fixed.
- Operation Save is successful.
TM1 rules compiled successfully are stored in files called cube name.rux.
TM1 also creates a file named cube name.blb when creating a rule, which includes format information for the Rules Editor.
Rules-how do they function?
Here is the case sequence.
- For (a position in) a cube, a value is demanded.
- TM1 Server checks whether the position of any measurement statements associated with the cube corresponds to the region description.
- When the position corresponds to a statement, the formula portion of the equation statement is evaluated by TM1.
- TM1 returns to the related region the estimated value.
Common thumb rules of Cognos TM1
- Note that this is an indicator that the cube is relatively sparse if most values in the cube are zeros.
- Almost always, multidimensional cubes are sparse.
- The more dimensions a cube has, the degree of sparsity is greater.
- There’s a difference in TM1 between a zero and a missing (or non-applicable) value.
- Values in TM1 can only be real numbers. Moreover, you can use zero to represent zero, no (or missing) value, and even non-valuable values.
- The effect of sparsity can be enormous on calculations.
Sparsity of Cognos TM1
TM1 uses a sparse consolidation algorithm during consolidation to skip over cells that contain zero or are empty.
In extremely sparse cubes, this algorithm accelerates consolidation calculations.
A sparse cube is a cube in which, as a percentage of total cells, the number of populated cells is low.
The combinatorial explosion of Cognos TM1
A combinatorial explosion in mathematics describes the effect of functions which, as a result of combinatorial considerations, develop very rapidly.
Cognos TM1 Rules Dissection
If you include feeder statements regulation (and you should), a SKIP CHECK and a FEEDERS declaration must also be included in the regulation.
Both calculation statements in the law must immediately precede the SKIP CHECK declaration.
Rules-statements for measurement of Cognos TM1
A statement for calculation consists of the following:
- Description of Region
- Qualifier for leaf, consolidation, or string From Formula
- Terminator Anyway
- Description of Region
You may determine which calculations apply to various sections of a cube by using areas.
Some relevant definitions of the region include.
- This will add all cells in the cube to the estimate.
- This would apply the calculation to all the aspect identified cells.
- This will extend the calculation to all cells identified by the elements.
- This will define a subset of data to extend the calculation to all cells defined by the elements of Jan 2012, New Jersey, New York, and Vermont (by enclosing all subset members in curly braces).
Syntax of region description of Cognos TM1
To establish a valid description of a given field, you must:
- Include each part in a single quote.
- Use commas to divide each of the elements.
- Enclosed in square brackets the whole description of the region.
Special characters and non-unique names for elements of Cognos TM1
A good instance is when one of the several control objects built into TM1 has to be referenced.
These objects contain a special character, the curly brace}).
You can write an area description using the above syntax, which describes the ADMIN group in the
Groups dimension as follows.
[‘}Clusters’:’ADMIN
The CONTINUE feature and descriptions of the region
Laws are sequentially applied.
Therefore, if two rules apply to the same cells identified by an area specification, the cells are added to the first rule encountered.
To apply additional rules to the cells, you can use the CONTINUE feature.
Numeric, consolidation, or (oh my!) string
Elements are described by Cognos TM1 as numeric (N:), consolidation (C:), or string (S:).
If N: is the qualifier, the sentence refers to the leaf cells only.
The argument refers only to the consolidated cells when the qualifier is C.
If the qualifier is S, the statement only applies to the cells of the string.
The calculation statement applies to all the cells in the specified area if there is no qualifier.
You need to be able to read the syntax of the following rules:
[‘Gross Margin percent ‘]=[‘Gross Margin’][‘Sales’]*100:
No region constraints are applied.
[‘Sales’]=N:[‘Price’]*[‘Units’]1000: The measurement of ‘Sales’ only applies to
N: or leaf level elements in the cube.
[‘Sales’]=C:[‘Sales’][‘Units’]*1000: The measurement of ‘Sales’ only applies to C: or consolidated cells. [‘Sales’]=C:[‘Sales’][‘Units’]*1000 and N:[‘Price’]*[‘Units’]1000: There is a separate formula applied for leaf level elements and consolidated cells.
Formulas Over
Numeric constants, arithmetic operators and brackets, functions (those that are true in rules),
conditional logic and references to data in other cubes can be used in rule formulas.
Constants of Numeric
On numeric constants, there are some basic points you should know:
Simplest components of measuring law.
Numerical
A leading sign may be included (optionally)
Can (also optionally) have a decimal point
Not allowed for alphabetic characters
The maximum length is 20 characters (numeric).
Scientific Notes are permitted
Operators of arithmetic
About arithmetic operators, there are some basic points you should know:
Valid operators include signs such as plus (+), minus-), (multiplication asterisk (*), division forward
slash (/), division backslash that returns zero when divided by zero) (and exponentiation (^).
In the following order, arithmetic operators are used.
Exponentiation
To compel a different order of assessment, parentheses may be used.
Conditional Logic Use
To have a conditional evaluation, Cognos TM1 Rules can be written.
Depending on the logic test, you can use the IF function to compel TM1 to evaluate a rule in a
different ways.
You will be able to recognize the format: if you are familiar with Microsoft Excel
IF(Inspection, Value1, Value2)
You need to be aware, along with the essential IF function, of the operators that you can use in TM1 to compare values.
They are greater than (>), less than (<), greater than or equal to (> =), less than or equal to (< =), equal to (=), and not equal to (< >) (as expected).
You have to insert the @ symbol before the comparison operator to compare two string values.
Using the logical operators And (&), Or (percent), and Not (~), you will need to be able to combine expressions within the TM1 law.
You can join (concatenate) string values in Cognos TM1 by using the pipe) (character, just make sure that the combined.
length of the resulting expression is checked as TM1 only allows a single string to be up to 255 bytes.
Referrals to Cube
Cube references that can be both internal references to data within the cube where the rule resides, and external references to data
within cubes other than the cube where the rule resides, are a very important part of recognizing and using Cognos TM1 Laws.
You must use the DB feature to reference data to another cube.
In a TM1 database, the DB method returns a value from a cube.
References from external cube
You need to code the DB function to reference data in a cube other than the cube where the rule resides.
For each of the dimensions in that cube, the DB function must reference the cube.
Conclusion
I hope you conclude Cognos TM1 feeders. You can learn more through Cognos TM1 online training.
Comments
Post a Comment