sql server - how can I test an MDX function? -


2 part question..

part 1: these where clauses give me correct data:

where { [time].[month].&[2011-06-01t00:00:00] } or { strtomember("[time].[month].&[2011-06-01t00:00:00]") } 

but returns nulls:

where { strtomember("[time].[month].&[" + format(now(), "yyyy-mm-") + "01t00:00:00]") } 

i tried yyyymm format. trying use current month.. etc..

part 2 (more important): how can verify format function returns? how can in mdx query analyzer:

select  format(now(), "yyyymm") 

i need execute function w/out selecting store.. there way test these functions?


update

figured out part 1

strtomember("[time].[month].&[" + format(now(), "yyyy-mm") + "-01t00:00:00]") 

it mm vs mm.. easy catch if able test output of function is..

using calculated measure:

with member xx format(now(), "yyyy-mm") select xx on 0 [yourcubename] 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -