on 09-29-2010 8:39 AM
Hello, I have an object that contains month and year, like this 01.2010 what I need is to create a new object that looks into this one and extracts year, can I do it in the universe?
I tried with this one but it gives an error when checking formula
subset(year_month,3,4)
Thanks in advance
Hi, when posting syntax questions it is best to also post what database you are connecting to as the syntax may change from one to another. I suspect what you are looking for is the "substring" function which may be either substring() or substr() depending on your database. The syntax you have looks fine, you just need the proper database function.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah, BEx, yes, that's a different situation.
To answer the question, yes, you can use any functions from the target system. So if your universe is pointing to an Oracle database you can use Decode() and NVL() and other Oracle-specific functions. If you're pointing to MS SQL Server you can use charindex() and patindex() and other SQL Server functions. But with BEx I believe you have to use the MDX language, so whatever functions you have there should work. I did a quick search, and it seems that MDX offers a Mid() function that performs the substring purpose. But I don't know if that works against BEx or not.
Hi,
SAP MDX expressions only allow numeric values ..
By the way you can return string values only with NAME or UNIQUENAME characteristic attributes.
So here are examples with 0CALMONTH characteristic you can use:
<EXPRESSION>RIGHT([0CALMONTH].currentmember.name,4)</EXPRESSION>
<EXPRESSION>RIGHT([0CALMONTH].currentmember.uniquename,4)</EXPRESSION>
Regards
Didier
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.