Re: How can I do dateadd(month, -1, <date here>) in MDX

Tech-Archive recommends: Fix windows errors by optimizing your registry



lookat the parrallelperiod function
like:
parrallelperiod ([month],-1, time.currentmember)

BOL description:
"Returns a member from a prior period in the same relative position as a
specified member. "


"K. Brooks" <jeepnreb@xxxxxxxxx> wrote in message
news:uii1CsrJGHA.1288@xxxxxxxxxxxxxxxxxxxxxxx
I have a report date dimension, that is one level with no "ALL" level. One
you open the cube, it defaults to the most recent report date. For some
new calculations, I would like to build some calc mems that will get some
data one month past as well. So if I am looking at my current actives, I
also want my reported actives one month ago. I can use the .LAG() and put
in 30, but I would like it so take in account 28,29,30 and 31 day months.
In SQL it is a simple dateadd(month, -1, <date here>). Please help, thank
you.

K. Brooks





.