Monday, November 25, 2013

CLEARBLOCK DYNAMIC

CLEARBLOCK DYNAMIC :

"This Calculation command is used to clear and remove blocks which contains the derived values from Dynamic calc and store member combination."

Now m going to explain how it works in real time as below.

As per definition,We need a member which contains "Dynamic Calc and Store" as a storage type.In Sample.Basic you can see “Diet” member under Product Dimension which is parent of few Shared members here and it has "Dynamic Calc and store" as a storage type.

For Better understanding this topic has been divided in to two parts.

Part 1 : How Blocks are creating for Dynamic calc and Store members?

As per below figure Sample.Basic has 175 Existing Upper-level blocks.


Purpose of Dynamic Calc and store member is calculated at time of first retrieval after that starts behaving as Stored Member. This means that block will be created when after first retrieval.



Retrieved the data for West->Diet member combination as below.





 Now Checking Statistics of Sample.Basic.





As per above Figure Sample. Basic has 176 Upper-level blocks.

Part 2 : Clear and Remove blocks using CLEARBLOCK DYNAMIC.


Here is basic Calculation Script which clears & removes blocks of derived values from Dynamic Calc and Store member combination.
//ESS_LOCALE English_UnitedStates.Latin1@Binary


FIX(@IDESCENDANTS ("Market"),@IDESCENDANTS ("Product"))


CLEARBLOCK DYNAMIC;


ENDFIX


After executing above calculation script.The Existing Upper-level blocks become 175 for Sample. Basic.


 Please write comments…Thanks




Wednesday, November 20, 2013

CLEARBLOCK




CLEARBLOCK 

This calculation command is used for setting the cell values to #missing & it removes empty blocks.

Syntax

CLEARBLOCK ALL | UPPER | NONINPUT | DYNAMIC | EMPTY;
ALL
Clears and removes all blocks.
UPPER
Clears consolidated level blocks.
NONINPUT
Clears blocks containing derived values. Applies to blocks that are completely created by a calculation operation. Cannot be a block into which any values were loaded.
DYNAMIC
Clears blocks containing values derived from Dynamic Calc and Store member combinations.
EMPTY
Removes empty blocks (blocks where all values are #MISSING).

CLEARBLOCK ALL:

Clears and removes all blocks.


Example 1:




Now consider “New York ->100-10”  combination block which contains values in all the cells as above.

As per the Statistics of Sample.Basic number of existing blocks are 374.

Code:

//ESS_LOCALE English_UnitedStates.Latin1@Binary

FIX ("New York","100-10")

CLEARBLOCK ALL;

ENDFIX

The above script executed successfully and result will be shown in below figure.



After executing the scripts data values are become zero & number of existing blocks remains 373.

Example 2:

The above script executed successfully and result will be shown in below figure.

Code:

//ESS_LOCALE English_UnitedStates.Latin1@Binary

FIX ("New York","200")

CLEARBLOCK ALL;

ENDFIX



 It clears & removed the data block of “New York ->200” combination.


CLEARBLOCK UPPER:

Clears consolidated level blocks.

Example 1:

Now m going to clear all upper level data from Sample.basic using CLEARBLOCK UPPER.



Figure: Before executing the script

As per above figure Existing upper-level blocks are “197”.

Code :

FIX(@IDESCENDANTS ("Product"),@IDESCENDANTS ("Market"))

CLEARBLOCK UPPER;

ENDFIX;


Figure: After executing the calculation script.

As per above figure Existing Upper-level blocks become “Zero”.
Example 2:




Code:

//ESS_LOCALE English_UnitedStates.Latin1@Binary

FIX (@DESCENDANTS ("Product"),@DESCENDANTS ("Market"))

CLEARBLOCK UPPER;

ENDFIX;

All upper level possible combinations under Market & Product dimensions.

New York->100, Massachusetts->100, Florida->100, Connecticut->100
New York->200, Massachusetts->200, Florida->200, Connecticut->200
New York->300, Massachusetts->300, Florida->300, Connecticut->300
New York->400, Massachusetts->400, Florida->400, Connecticut->400
East->100,East->200,East->300,East->400
.....
....
etc..


Note : We can also clear all upper level data through EAS console.


CLEARBLOCK NONINPUT:

This Calculation command is used to clear the blocks which contains derived values from calculations. These blocks are created through calculations. In other words, the blocks which are created during the sparse calculation process called NONINPUT blocks.

For example : in Sample Basic, the East -> Cola, West->Cola…  blocks are created during a sparse calculation process.


Note : We can also clear all upper level data through EAS console.

What is the difference Between CLEARBLOCK UPPER & CLEARBLOCK NONINPUT ?

CLEARBLOCK UPPER: It clears upper level blocks can be input or noninput blocks.
CLEARBLOCK NONINPUT: It clears only Noninput blocks.

Please write feed back