December 19, 2014 at 2:12 am
Hi All,
Is there any function like Floor function in MDX.
Ex: 1) value is 1.9 then output is 1
2) value is 1.1 then output is 1
3) value is 0.4 then output is 0
4) value is 0.5 then output is 0
my aim is before dot(.) value i have to return. is there any function for this in mdx.
Regards,
Naru
January 8, 2015 at 2:19 am
If returning whatever value is before the decimal is your only goal then you can just do some string manipulation and cast it as a number. In the following example, imagine that the [x] measure is your value:
MEMBER [xFormat]
AS
StrToValue(LEFT([X], INSTR(CSTR([X]), ".")-1))
There are floor functions available in MDX (via vba) but they do not do as you describe as far as I know.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply