LEFT and RIGHT functions in Essbase


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
Advertisements

About Celvin Kattookaran

Iโ€™m an EPM Consultant, my primary focus is on Hyperion Planning and Essbase. Some of you from Hyperion Support team might recognize me or have seen my support articles, I was with the WebAnalysis Support Team. I'm an Independent Consultant with โ€œIntekgrate Corporationโ€ based out of Aurora office. Iโ€™m from Godโ€™s Own Country (Kerala, India), lived in all southern states of India, Istanbul and Johannesburg (and of course United States). Iโ€™m core gamer :) and an avid reader. I was awarded Oracle ACE Director for my contributions towards EPM community.


Leave a Reply

0 thoughts on “LEFT and RIGHT functions in Essbase