Since these days I’m working (playing around) a lot with Custom things….I thought why not create some custom functions in Essbase.
Actually the seed for this was implanted by my best friend…..Mihriban……(maybe a hangover of Inception)
So my dear Mihriban Hanam this is for you š
We were once discussing why Financial Reporting is not having a substring function…..I’m still to figure out how to add it to FR š …..but then it was time for Essbase…..
So here we go…..I’ve created 4 string functions…
- LEFT is similar to the EXCEL Left function
- RIGHT is similar to EXCEL Right function
- EQUALS
- CONTAINS
I used Sample Basic to check the functions…..
LEFT
FIX(“100-10″,”Jan”,@DESCENDANTS (“Market”),”Budget”)
“Sales”
(
IF(@Comp_String_Equals (@LEFT (@NAME(@CURRMBR(“Market”)),3),”new”) ==0)
“Sales” = 1;
ELSE
“Sales” =0;
ENDIF
)
ENDFIX
Result
New York, New Hampshire, New Mexico got 1.
RIGHT
FIX(“100-10″,”Jan”,@DESCENDANTS (“Market”),”Budget”)
“Sales”
(
IF(@Comp_String_Equals (@RIGHT (@NAME(@CURRMBR(“Market”)),2),”on”) ==0)
“Sales” = 1;
ELSE
“Sales” =0;
ENDIF
)
ENDFIX
RESULT
Oregon, Washington got 1
CONTAINS
FIX(“100-10″,”Jan”,@DESCENDANTS (“Market”),”Budget”)
“Sales”
(
IF(@Comp_String_Contains((@NAME(@CURRMBR(“Market”))),”sh”) ==0)
“Sales” = 1;
ELSE
“Sales” =0;
ENDIF
)
ENDFIX
RESULT
New Hampshire, Washington got 1
You can get the JAR file from here.
You can get the installation file from here.
For Installation instructions go here
So … have you figured this out for HFR yet? Because oh man could I use that right about now š
@anon not yet š
I know that something which lacks in FR.
Ah well …. maybe I can rig up some terrible lookup on a grid that doesn't show …
Celvin,
Any possibilities of having something like @STRINGTONUM(@CURRMBR("Entity"))
for example my entity dimension has all numbers as dimension members, and essbase treats them as string, upon certian conditions if i happen to store the member of entity dimension as data to any other member in other dimensions then this function will be very useful.
Hope i am making sense in my above explanation.
Shantan Kommera
@shantan I'm not able to understand the logic of making data as metadata.
Hi Celvin,
I am getting error below after restarting EAS & Essbase server
for the Function
IF (@Comp_String_Equals (@LEFT (@NAME(@CURRMBR(“AFE”)),1),”B”) ==0)
Error: 1200324 Error compiling formula for [Remaining Bucket Spend] (line 25): operator expected after [@Comp_String_Equals]
We were able to follow all the steps? That error is saying that the function is not registered properly
Yes,I did
Check in the server/application logs any error related to that function. It should say registered function
Wrong java method specification [com.cera.hyperionUtils.HypStringtoInt.strtoint(String)] (function [@StringtoInteger]): [specified class not found:com.cera.hyperionUtils.HypStringtoInt]
[Mon Feb 12 13:49:37 2018]Local/Sample///4264/Warning(1200490)
Wrong java method specification [com.cera.hyperionUtils.HypStringtoDouble.strtodouble(String)] (function [@StringtoDouble]): [specified class not found:com.cera.hyperionUtils.HypStringtoDouble]
[Mon Feb 12 13:49:37 2018]Local/Sample///4264/Warning(1200490)
Wrong java method specification [com.cera.hyperionUtils.HypStringtoDoublewReplace.strtodoublewrplc(String,String)] (function [@StringtoDoublewReplace]): [specified class not found:com.cera.hyperionUtils.HypStringtoDoublewReplace]
[Mon Feb 12 13:49:37 2018]Local/Sample///4264/Warning(1200490)
Wrong java method specification [com.cera.hyperionUtils.HypStringtoIntwReplace.strtointwrplc(String,String)] (function [@StringtoIntegerwReplace]): [specified class not found:com.cera.hyperionUtils.HypStringtoIntwReplace]
[Mon Feb 12 13:49:37 2018]Local/Sample///4264/Warning(1200490)
Wrong java method specification [com.cera.hyperionUtils.HypDate.curdate(int)] (function [@Get_Cur_Date]): [specified class not found:com.cera.hyperionUtils.HypDate]
[Mon Feb 12 13:49:37 2018]Local/Sample///4264/Warning(1200490)
Wrong java method specification [com.cera.hyperionUtils.HypChangeDate.changedate(int,int)] (function [@Change_Cur_Date]): [specified class not found:com.cera.hyperionUtils.HypChangeDate]
[Mon Feb 12 13:49:37 2018]Local/Sample///4264/Warning(1200490)
Wrong java method specification [com.cera.hyperionUtils.HypStringLeft.left(String,int)] (function [@LEFT]): [specified class not found:com.cera.hyperionUtils.HypStringLeft]
So the registration is not successful, did you download the jar file? Did you update udf policy file?
Yes .. I worked on one of the Test LAB 11.1.24 but not 11.1.2,3 Last patch
Hey Celvin,
Is the JAR file still available for download ? Thanks in advance.
Regards,
Andy