|
Home > Archive > MS SQL Data Warehousing > February 2006 > How can I do dateadd(month, -1, <date here>) in MDX
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
How can I do dateadd(month, -1, <date here>) in MDX
|
|
| K. Brooks 2006-01-31, 8:23 pm |
| 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
| |
|
| 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@yahoo.com> wrote in message
news:uii1CsrJGHA.1288@TK2MSFTNGP09.phx.gbl...
>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
>
>
>
| |
| Sreejith G 2006-02-08, 7:23 am |
| Please check "parallelperiod" in MDX, this would suffice your requirement.
Check this link ->
http://www.databasejournal.com/feat...10894_3073581_3
Thanks,
Sree
"Jéjé" wrote:
> 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@yahoo.com> wrote in message
> news:uii1CsrJGHA.1288@TK2MSFTNGP09.phx.gbl...
>
>
>
|
|
|
|
|