Applied Dimensionality

Cyclic calculations in Analyst or “Make yourself an own @SliceUpdate”

Posted at — Feb 21, 2008
Cyclic calculations in Analyst or “Make yourself an own @SliceUpdate”

In the old times, before SliceUpdate first appeared ) we’ve thought that one thing analyst lacked to be really all-in-one tool was ability to do loops. For, while, until — all that nice stuff. And when SliceUpdate was introduced it became clear that @Test(Restart) allows you to cycle macro execution on whatever basis.

Using @Test(Restart) allowed doing a lot of interesting things, like calculating optimal production plans (repeat until reach given condition), even a sample calculation of admixtures for zink was made once ;)

But most common use of @Test(Restart) was building your own Slice update macro. A detailed instruction follows.

Most common reason for DIY SliceUpdate is that you don’t want to put Contributor>Analyst links in UpdateList of cubes. Sincerely it’s not a reason at all, because if you follow exp\imp guidelines, you’ll have fully separate cubes for exporting from contributor and will be able to anything with their updatelists. But if you didn’t and the project is nearly at the production stage and you just can’t do C>A links due to volume limits:

  1. Create an allocation cube with your elist and {standard, current step,what to transfer} dlist.
  2. Fill standard column with increasing numbers 1..number_of_elist_items (they’ll be elists)
  3. Make ‘what to transfer’ dlist-formated (by elist) and containing the formula ‘if current step = 1 then standard’
  4. Put this cube in C>A links using what to transfer column
  5. In macro, first copy standard to current step then iterate the following with @TEST(current step > 0;@Restart)
    1. Run link — only 1 elist will be transfered
    2. Decrease current step column by 1 (subtract dlink) — move the ruler down one step
    3. Loop

Salt, pepper and serve with wine of preference.

PS By placing 1 in couple of rows at start you transfer 2 elists at a time, in three rows — 3 elists and so on.

PSPS Publish is faster )

comments powered by Disqus