This content has been marked as final. Show 6 replies
Let's look at the example in techref.
I think what they are missing in the code is a higher level member in FIX for products, so it'll now be
"Average Sales" (IF(@ISLEV(Product,0)) Sales; ELSE @AVGRANGE(SKIPNONE,Sales,@CHILDREN(@CURRMBR(Product))); ENDIF;);
What that code does is it goes and check which level 1 product is calculated and it has to now get the children of that product and then do an avg of that range (Sales, children of current product which is calculated).
FIX(@LEVMBRS(Product,1), "New York",Actual, Sales) "Average Sales" (IF(@ISLEV(Product,0)) Sales; ELSE @AVGRANGE(SKIPNONE,Sales,@CHILDREN(@CURRMBR(Product))); ENDIF;); ENDFIX
I've seen people using (abusing) @CURRMBR
If you have products in your fix, you don't need to specify @CURRMBR because Essbase already knows it.
IF (@ISMBR(Sales)) @CURRMBR(Product); ELSE something
So use @CURRMBR only in places where you are performing something like avgrange of currmbr or if you are using a substring and finding another member.
This is one good example you gave but I think Anubhav is looking more for where the performanc degrades due to @CURRMBR function ? Like earlier there were 5 members under a parent which is been enclosed in @CURRMBR & with recent changes there are now 80 members under the same parent. The calculation script performance degrades like anything. Apart from being a Run time function what else is do you think the reason for CURRMBR to behave in such adamant manner ?
got your Point but what Narendra has said i am looking for more Possible Explainnation regarding this function.
suppose i have 5 members and i am using currmbr in a concatenation function the scripts executes in acceptable time but whenever i add member lets say 100 and execute the same script it takes a hell lot of time.
any possible explaination about that.
also lets say if i use @member(@parent(@currmbr())) & instead i use @parentval() there is a huge diff in execution time.
is there when we group one or more function with @currmbr the performance decrease???
just want to gather some idea how currmbr behaves.
There are a number of functions that slow performance @currmbr, @prior to name a couple. Sometimes you can work around using these functions other times you can not. In the case of @prior, I had a formula that had multiple @priors for multiple years. I got it to work mush faster by hard codeing the years in
Isn't that true for all the calcs? when you throw more members into the calc, it takes more time.
As glenn mentioned sometimes you've a work around.
In your case maybe it is not currmbr which is causing the problem but @parent.
In some cases, the @PARENT function is equivalent to the @PARENTVAL function, except in terms of calculation performance. For example, the following two formulas are equivalent:Sales = @PARENT(Profit);
Sales = @PARENTVAL(Profit);
In this case, using the latter formula results in better calculation performance. In general, use @PARENT as a member rather than as an implied value of a cell. For example:
Sales = @AVG(SKIPMISSING, @ISIBLINGS(@PARENT("100")));>
I'm using concat and currmbr on a dimension which has around 15000~ members. However I've some udas inbuilt which reduces the number of members that I'm pulling.
i agree, but celvin if you write a script in such a way that you ar using only @currmbr then also execution time is more.
what i want to know is :-
1) how the @currmbr works/Behave
2)what is the Possible reason for @currmbr to impact the script performance even if wrote in a simple manner.
Thanks in advance for your Reply.