dbTalk Databases Forums  

MDX for latest month as Default member

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss MDX for latest month as Default member in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Darren Drysdale
 
Posts: n/a

Default MDX for latest month as Default member - 05-10-2004 , 03:26 AM






all

I'd really appreciate it if someone can help out with some mdx needed in
order to specify the default member from the time dimension - i need this to
be the latest /current month - imagine a 'snapshot month' dimension.. thre
users would like to see the current snapshot month and not, by default, any
others..

If I have 2 dims - one for year and one for month the same type of code is
applicable presumably?

many thanks

Darren



Reply With Quote
  #2  
Old   
Michael Vardinghus
 
Posts: n/a

Default Re: MDX for latest month as Default member - 05-10-2004 , 03:46 AM






Posted this to another one some time ago:

Don't know if this is what you're looking for.

Sorry bout the danish - used default member mdx sentence
which is to be
Quote:
entered in the dimension editor - you need to

* alter the code below so it uses the syntax of your time
dimension
* perhaps change the logic - if you just want it to use
today it will be a
lot simpler - below it chooses previous month

-- year

strtomember("Tid.["+iif(month(now())=1,ltrim(str(Year(Now
())-1)),ltrim(str(Y
ear(now()))))+"]."

-- quarter

+"[Kvartal " +
iif(month(now())=1,"4].",iif(Month(now())<=4,"1].",iif
(month(now())<=7,"2]."
,iif(month(now())<=10,"3].","4]."))))+

-- month

"["+iif(month(now())=1,"December",iif(month(now( ))
=2,"Januar",iif(month(now(
))=3,"Februar",iif(month(now())=4,"Marts",iif(mont h(now())
=5,"April",iif(mon
th(now())=6,"Maj",iif(month(now())=7,"Juni",iif(mo nth(now
())=8,"Juli",iif(mo
nth(now())=9,"August",iif(month(now())=10,"Septemb er",iif
(month(now())=11,"O
ktober","November")))))))))))+"]")


Hope it helps....couldn't use it myself yet because my
front end didn't
support it.

Michael Vardinghus
However ... don't understand why you have two dimensions...

"Darren Drysdale" <darrend (AT) hotmail (DOT) com> skrev i en meddelelse
news:%23kh23hmNEHA.1392 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
Quote:
all

I'd really appreciate it if someone can help out with some mdx needed in
order to specify the default member from the time dimension - i need this
to
be the latest /current month - imagine a 'snapshot month' dimension.. thre
users would like to see the current snapshot month and not, by default,
any
others..

If I have 2 dims - one for year and one for month the same type of code is
applicable presumably?

many thanks

Darren





Reply With Quote
  #3  
Old   
Michael Vardinghus
 
Posts: n/a

Default Re: MDX for latest month as Default member - 05-10-2004 , 03:57 AM



An extra comment.. the sentence above uses date functions and by strtomember
merges these together to get a time-dimension selection. Here is an example
of what my time dimension members look like:

[Tid].[2004].[Kvartal 2].[april]

As stated below you need to alter the sentence to hit the syntax of your
time dimension (the whole sentence is to be throwed into the formula of the
time dimension).

"Michael Vardinghus" <michaelvardinghus (AT) hotmail (DOT) com> skrev i en meddelelse
news:OEgj%23qmNEHA.2976 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
Quote:
Posted this to another one some time ago:

Don't know if this is what you're looking for.

Sorry bout the danish - used default member mdx sentence
which is to be
entered in the dimension editor - you need to

* alter the code below so it uses the syntax of your time
dimension
* perhaps change the logic - if you just want it to use
today it will be a
lot simpler - below it chooses previous month

-- year

strtomember("Tid.["+iif(month(now())=1,ltrim(str(Year(Now
())-1)),ltrim(str(Y
ear(now()))))+"]."

-- quarter

+"[Kvartal " +
iif(month(now())=1,"4].",iif(Month(now())<=4,"1].",iif
(month(now())<=7,"2]."
,iif(month(now())<=10,"3].","4]."))))+

-- month

"["+iif(month(now())=1,"December",iif(month(now( ))
=2,"Januar",iif(month(now(
))=3,"Februar",iif(month(now())=4,"Marts",iif(mont h(now())
=5,"April",iif(mon
th(now())=6,"Maj",iif(month(now())=7,"Juni",iif(mo nth(now
())=8,"Juli",iif(mo
nth(now())=9,"August",iif(month(now())=10,"Septemb er",iif
(month(now())=11,"O
ktober","November")))))))))))+"]")


Hope it helps....couldn't use it myself yet because my
front end didn't
support it.

Michael Vardinghus

However ... don't understand why you have two dimensions...

"Darren Drysdale" <darrend (AT) hotmail (DOT) com> skrev i en meddelelse
news:%23kh23hmNEHA.1392 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
all

I'd really appreciate it if someone can help out with some mdx needed in
order to specify the default member from the time dimension - i need
this
to
be the latest /current month - imagine a 'snapshot month' dimension..
thre
users would like to see the current snapshot month and not, by default,
any
others..

If I have 2 dims - one for year and one for month the same type of code
is
applicable presumably?

many thanks

Darren







Reply With Quote
  #4  
Old   
Darren Drysdale
 
Posts: n/a

Default Re: MDX for latest month as Default member - 05-10-2004 , 04:16 AM



Michael

thanks for that - I have 2 dims - one just months and one just years - to
allow for cross tabbing the 2 (using BusinessObjects Webi OLAP)

I can just use the year and month parts of the code independently?

e.g.

Year

strtomember("year.["+iif(month(now())=1,ltrim(str(Year(Now())-1)),ltrim(str(
Year(now()))))+"]





Month

iif(month(now())=1,"December",iif(month(now())

=2,"January",iif(month(now(

Quote:
))=3,"February",iif(month(now())=4,"Marts",iif(mon th(now())
=5,"April",iif(month(now())=6,"May",iif(month(now( ))=7,"June",iif(month(now

())=8,"July",iif(month(now())=9,"August",iif(month (now())=10,"September",iif

(month(now())=11,"October","November")))))))))))+" ]")



Also, what does the 'Marts' refer to on line 3 above?



many thanks



Darren



"Michael Vardinghus" <michaelvardinghus (AT) hotmail (DOT) com> wrote

Quote:
An extra comment.. the sentence above uses date functions and by
strtomember
merges these together to get a time-dimension selection. Here is an
example
of what my time dimension members look like:

[Tid].[2004].[Kvartal 2].[april]

As stated below you need to alter the sentence to hit the syntax of your
time dimension (the whole sentence is to be throwed into the formula of
the
time dimension).

"Michael Vardinghus" <michaelvardinghus (AT) hotmail (DOT) com> skrev i en meddelelse
news:OEgj%23qmNEHA.2976 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
Posted this to another one some time ago:

Don't know if this is what you're looking for.

Sorry bout the danish - used default member mdx sentence
which is to be
entered in the dimension editor - you need to

* alter the code below so it uses the syntax of your time
dimension
* perhaps change the logic - if you just want it to use
today it will be a
lot simpler - below it chooses previous month

-- year

strtomember("Tid.["+iif(month(now())=1,ltrim(str(Year(Now
())-1)),ltrim(str(Y
ear(now()))))+"]."

-- quarter

+"[Kvartal " +
iif(month(now())=1,"4].",iif(Month(now())<=4,"1].",iif
(month(now())<=7,"2]."
,iif(month(now())<=10,"3].","4]."))))+

-- month

"["+iif(month(now())=1,"December",iif(month(now( ))
=2,"Januar",iif(month(now(
))=3,"Februar",iif(month(now())=4,"Marts",iif(mont h(now())
=5,"April",iif(mon
th(now())=6,"Maj",iif(month(now())=7,"Juni",iif(mo nth(now
())=8,"Juli",iif(mo
nth(now())=9,"August",iif(month(now())=10,"Septemb er",iif
(month(now())=11,"O
ktober","November")))))))))))+"]")


Hope it helps....couldn't use it myself yet because my
front end didn't
support it.

Michael Vardinghus

However ... don't understand why you have two dimensions...

"Darren Drysdale" <darrend (AT) hotmail (DOT) com> skrev i en meddelelse
news:%23kh23hmNEHA.1392 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
all

I'd really appreciate it if someone can help out with some mdx needed
in
order to specify the default member from the time dimension - i need
this
to
be the latest /current month - imagine a 'snapshot month' dimension..
thre
users would like to see the current snapshot month and not, by
default,
any
others..

If I have 2 dims - one for year and one for month the same type of
code
is
applicable presumably?

many thanks

Darren









Reply With Quote
  #5  
Old   
Michael Vardinghus
 
Posts: n/a

Default Re: MDX for latest month as Default member - 05-10-2004 , 04:33 AM



I would think that the would work indepently...and sorry bout the danish -
can see in my code I made an
odd combination of month names in english and danish...Marts should be
March - sorry.

But are your months named by month name or month number ? If number you
don't have to translate to month name
like i do below.

\Michael Vardinghus


"Darren Drysdale" <darrend (AT) hotmail (DOT) com> skrev i en meddelelse
news:eQ00x9mNEHA.3312 (AT) tk2msftngp13 (DOT) phx.gbl...
Quote:
Michael

thanks for that - I have 2 dims - one just months and one just years - to
allow for cross tabbing the 2 (using BusinessObjects Webi OLAP)

I can just use the year and month parts of the code independently?

e.g.

Year


strtomember("year.["+iif(month(now())=1,ltrim(str(Year(Now())-1)),ltrim(str(
Year(now()))))+"]





Month

iif(month(now())=1,"December",iif(month(now())

=2,"January",iif(month(now(

))=3,"February",iif(month(now())=4,"Marts",iif(mon th(now())


=5,"April",iif(month(now())=6,"May",iif(month(now( ))=7,"June",iif(month(now


())=8,"July",iif(month(now())=9,"August",iif(month (now())=10,"September",iif

(month(now())=11,"October","November")))))))))))+" ]")



Also, what does the 'Marts' refer to on line 3 above?



many thanks



Darren



"Michael Vardinghus" <michaelvardinghus (AT) hotmail (DOT) com> wrote in message
news:%236HUswmNEHA.2468 (AT) TK2MSFTNGP11 (DOT) phx.gbl...
An extra comment.. the sentence above uses date functions and by
strtomember
merges these together to get a time-dimension selection. Here is an
example
of what my time dimension members look like:

[Tid].[2004].[Kvartal 2].[april]

As stated below you need to alter the sentence to hit the syntax of your
time dimension (the whole sentence is to be throwed into the formula of
the
time dimension).

"Michael Vardinghus" <michaelvardinghus (AT) hotmail (DOT) com> skrev i en
meddelelse
news:OEgj%23qmNEHA.2976 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
Posted this to another one some time ago:

Don't know if this is what you're looking for.

Sorry bout the danish - used default member mdx sentence
which is to be
entered in the dimension editor - you need to

* alter the code below so it uses the syntax of your time
dimension
* perhaps change the logic - if you just want it to use
today it will be a
lot simpler - below it chooses previous month

-- year

strtomember("Tid.["+iif(month(now())=1,ltrim(str(Year(Now
())-1)),ltrim(str(Y
ear(now()))))+"]."

-- quarter

+"[Kvartal " +
iif(month(now())=1,"4].",iif(Month(now())<=4,"1].",iif
(month(now())<=7,"2]."
,iif(month(now())<=10,"3].","4]."))))+

-- month

"["+iif(month(now())=1,"December",iif(month(now( ))
=2,"Januar",iif(month(now(
))=3,"Februar",iif(month(now())=4,"Marts",iif(mont h(now())
=5,"April",iif(mon
th(now())=6,"Maj",iif(month(now())=7,"Juni",iif(mo nth(now
())=8,"Juli",iif(mo
nth(now())=9,"August",iif(month(now())=10,"Septemb er",iif
(month(now())=11,"O
ktober","November")))))))))))+"]")


Hope it helps....couldn't use it myself yet because my
front end didn't
support it.

Michael Vardinghus

However ... don't understand why you have two dimensions...

"Darren Drysdale" <darrend (AT) hotmail (DOT) com> skrev i en meddelelse
news:%23kh23hmNEHA.1392 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
all

I'd really appreciate it if someone can help out with some mdx
needed
in
order to specify the default member from the time dimension - i need
this
to
be the latest /current month - imagine a 'snapshot month'
dimension..
thre
users would like to see the current snapshot month and not, by
default,
any
others..

If I have 2 dims - one for year and one for month the same type of
code
is
applicable presumably?

many thanks

Darren











Reply With Quote
  #6  
Old   
Darren Drysdale
 
Posts: n/a

Default Re: MDX for latest month as Default member - 05-10-2004 , 04:50 AM



Michael

the months are using the name..

The code will be as follows:??
iif(month(now())="December",iif(month(now())
="January",iif(month(now())="February",iif(month(n ow())="March" . etc etc

or can i just use something like

month(now())

similar to using month = convert(month,getdate()) in SQL..?

sorry for being slow!..



"Michael Vardinghus" <michaelvardinghus (AT) hotmail (DOT) com> wrote

Quote:
I would think that the would work indepently...and sorry bout the danish -
can see in my code I made an
odd combination of month names in english and danish...Marts should be
March - sorry.

But are your months named by month name or month number ? If number you
don't have to translate to month name
like i do below.

\Michael Vardinghus


"Darren Drysdale" <darrend (AT) hotmail (DOT) com> skrev i en meddelelse
news:eQ00x9mNEHA.3312 (AT) tk2msftngp13 (DOT) phx.gbl...
Michael

thanks for that - I have 2 dims - one just months and one just years -
to
allow for cross tabbing the 2 (using BusinessObjects Webi OLAP)

I can just use the year and month parts of the code independently?

e.g.

Year



strtomember("year.["+iif(month(now())=1,ltrim(str(Year(Now())-1)),ltrim(str(
Year(now()))))+"]





Month

iif(month(now())=1,"December",iif(month(now())

=2,"January",iif(month(now(

))=3,"February",iif(month(now())=4,"Marts",iif(mon th(now())



=5,"April",iif(month(now())=6,"May",iif(month(now( ))=7,"June",iif(month(now



())=8,"July",iif(month(now())=9,"August",iif(month (now())=10,"September",iif

(month(now())=11,"October","November")))))))))))+" ]")



Also, what does the 'Marts' refer to on line 3 above?



many thanks



Darren



"Michael Vardinghus" <michaelvardinghus (AT) hotmail (DOT) com> wrote in message
news:%236HUswmNEHA.2468 (AT) TK2MSFTNGP11 (DOT) phx.gbl...
An extra comment.. the sentence above uses date functions and by
strtomember
merges these together to get a time-dimension selection. Here is an
example
of what my time dimension members look like:

[Tid].[2004].[Kvartal 2].[april]

As stated below you need to alter the sentence to hit the syntax of
your
time dimension (the whole sentence is to be throwed into the formula
of
the
time dimension).

"Michael Vardinghus" <michaelvardinghus (AT) hotmail (DOT) com> skrev i en
meddelelse
news:OEgj%23qmNEHA.2976 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
Posted this to another one some time ago:

Don't know if this is what you're looking for.

Sorry bout the danish - used default member mdx sentence
which is to be
entered in the dimension editor - you need to

* alter the code below so it uses the syntax of your time
dimension
* perhaps change the logic - if you just want it to use
today it will be a
lot simpler - below it chooses previous month

-- year

strtomember("Tid.["+iif(month(now())=1,ltrim(str(Year(Now
())-1)),ltrim(str(Y
ear(now()))))+"]."

-- quarter

+"[Kvartal " +
iif(month(now())=1,"4].",iif(Month(now())<=4,"1].",iif
(month(now())<=7,"2]."
,iif(month(now())<=10,"3].","4]."))))+

-- month

"["+iif(month(now())=1,"December",iif(month(now( ))
=2,"Januar",iif(month(now(
))=3,"Februar",iif(month(now())=4,"Marts",iif(mont h(now())
=5,"April",iif(mon
th(now())=6,"Maj",iif(month(now())=7,"Juni",iif(mo nth(now
())=8,"Juli",iif(mo
nth(now())=9,"August",iif(month(now())=10,"Septemb er",iif
(month(now())=11,"O
ktober","November")))))))))))+"]")


Hope it helps....couldn't use it myself yet because my
front end didn't
support it.

Michael Vardinghus

However ... don't understand why you have two dimensions...

"Darren Drysdale" <darrend (AT) hotmail (DOT) com> skrev i en meddelelse
news:%23kh23hmNEHA.1392 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
all

I'd really appreciate it if someone can help out with some mdx
needed
in
order to specify the default member from the time dimension - i
need
this
to
be the latest /current month - imagine a 'snapshot month'
dimension..
thre
users would like to see the current snapshot month and not, by
default,
any
others..

If I have 2 dims - one for year and one for month the same type of
code
is
applicable presumably?

many thanks

Darren













Reply With Quote
  #7  
Old   
Michael Vardinghus
 
Posts: n/a

Default Re: MDX for latest month as Default member - 05-10-2004 , 05:42 AM



Believe it's quite similar...perhaps the function you mention works instead.
Not sure if the now statement is an
mdx or sql-statement however now on month below returns a number ... not a
month...therefore I had to
hardcorde the monthname - the reason for doing so was no knowledge of a
statement to give me the monthname
in mdx.

In my statement I selected previous month - if you want to select currentm
month it will be

iif(if(month(now())=1;"January",iif(month(now())
=2;"February",iif(month(now())=3;"March",iif(month (now())="March" . etc etc

But the question is if you need to make an iif statement on the month.....i
used an nested iif statement to get previous month - perhaps
a statement that fetches the month name would be enough.

Be aware - if you want to choose current month the year statement doesn't
need the iif statement as well - that will also
be Year(now) - perhaps with an ltrim (had to do that to get it to work.)


"Darren Drysdale" <darrend (AT) hotmail (DOT) com> skrev i en meddelelse
news:uWZrMRnNEHA.624 (AT) TK2MSFTNGP11 (DOT) phx.gbl...
Quote:
Michael

the months are using the name..

The code will be as follows:??
iif(month(now())="December",iif(month(now())
="January",iif(month(now())="February",iif(month(n ow())="March" . etc etc

or can i just use something like

month(now())

similar to using month = convert(month,getdate()) in SQL..?

sorry for being slow!..



"Michael Vardinghus" <michaelvardinghus (AT) hotmail (DOT) com> wrote in message
news:u2rHSFnNEHA.2708 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
I would think that the would work indepently...and sorry bout the
danish -
can see in my code I made an
odd combination of month names in english and danish...Marts should be
March - sorry.

But are your months named by month name or month number ? If number you
don't have to translate to month name
like i do below.

\Michael Vardinghus


"Darren Drysdale" <darrend (AT) hotmail (DOT) com> skrev i en meddelelse
news:eQ00x9mNEHA.3312 (AT) tk2msftngp13 (DOT) phx.gbl...
Michael

thanks for that - I have 2 dims - one just months and one just
years -
to
allow for cross tabbing the 2 (using BusinessObjects Webi OLAP)

I can just use the year and month parts of the code independently?

e.g.

Year




strtomember("year.["+iif(month(now())=1,ltrim(str(Year(Now())-1)),ltrim(str(
Year(now()))))+"]





Month

iif(month(now())=1,"December",iif(month(now())

=2,"January",iif(month(now(

))=3,"February",iif(month(now())=4,"Marts",iif(mon th(now())




=5,"April",iif(month(now())=6,"May",iif(month(now( ))=7,"June",iif(month(now




())=8,"July",iif(month(now())=9,"August",iif(month (now())=10,"September",iif

(month(now())=11,"October","November")))))))))))+" ]")



Also, what does the 'Marts' refer to on line 3 above?



many thanks



Darren



"Michael Vardinghus" <michaelvardinghus (AT) hotmail (DOT) com> wrote in message
news:%236HUswmNEHA.2468 (AT) TK2MSFTNGP11 (DOT) phx.gbl...
An extra comment.. the sentence above uses date functions and by
strtomember
merges these together to get a time-dimension selection. Here is an
example
of what my time dimension members look like:

[Tid].[2004].[Kvartal 2].[april]

As stated below you need to alter the sentence to hit the syntax of
your
time dimension (the whole sentence is to be throwed into the formula
of
the
time dimension).

"Michael Vardinghus" <michaelvardinghus (AT) hotmail (DOT) com> skrev i en
meddelelse
news:OEgj%23qmNEHA.2976 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
Posted this to another one some time ago:

Don't know if this is what you're looking for.

Sorry bout the danish - used default member mdx sentence
which is to be
entered in the dimension editor - you need to

* alter the code below so it uses the syntax of your time
dimension
* perhaps change the logic - if you just want it to use
today it will be a
lot simpler - below it chooses previous month

-- year

strtomember("Tid.["+iif(month(now())=1,ltrim(str(Year(Now
())-1)),ltrim(str(Y
ear(now()))))+"]."

-- quarter

+"[Kvartal " +
iif(month(now())=1,"4].",iif(Month(now())<=4,"1].",iif
(month(now())<=7,"2]."
,iif(month(now())<=10,"3].","4]."))))+

-- month

"["+iif(month(now())=1,"December",iif(month(now( ))
=2,"Januar",iif(month(now(
))=3,"Februar",iif(month(now())=4,"Marts",iif(mont h(now())
=5,"April",iif(mon
th(now())=6,"Maj",iif(month(now())=7,"Juni",iif(mo nth(now
())=8,"Juli",iif(mo
nth(now())=9,"August",iif(month(now())=10,"Septemb er",iif
(month(now())=11,"O
ktober","November")))))))))))+"]")


Hope it helps....couldn't use it myself yet because my
front end didn't
support it.

Michael Vardinghus

However ... don't understand why you have two dimensions...

"Darren Drysdale" <darrend (AT) hotmail (DOT) com> skrev i en meddelelse
news:%23kh23hmNEHA.1392 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
all

I'd really appreciate it if someone can help out with some mdx
needed
in
order to specify the default member from the time dimension - i
need
this
to
be the latest /current month - imagine a 'snapshot month'
dimension..
thre
users would like to see the current snapshot month and not, by
default,
any
others..

If I have 2 dims - one for year and one for month the same type
of
code
is
applicable presumably?

many thanks

Darren















Reply With Quote
  #8  
Old   
Matthias Englert
 
Posts: n/a

Default Re: MDX for latest month as Default member - 05-11-2004 , 02:45 AM



"Darren Drysdale" <darrend (AT) hotmail (DOT) com> schrieb im Newsbeitrag
news:%23kh23hmNEHA.1392 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
Quote:
all

I'd really appreciate it if someone can help out with some mdx needed in
order to specify the default member from the time dimension - i need this
to
be the latest /current month - imagine a 'snapshot month' dimension.. thre
users would like to see the current snapshot month and not, by default,
any
others..

If I have 2 dims - one for year and one for month the same type of code is
applicable presumably?

many thanks

Darren


You can also use VBA!Date() in MDX with some formattings instead of Now() to
create the month-name.

Regards,
Matthias




Reply With Quote
  #9  
Old   
Darren Drysdale
 
Posts: n/a

Default Re: MDX for latest month as Default member - 05-11-2004 , 11:03 AM



Michael

i tried the code but the usually friendly sytax error came up.. I tried
usign Foodmart but no joy - the dim is called Time which i changed and
renamed all the names 9e.g. Month names) to English

My real date dimension is called calendar but I thought I'd try with
Foodmart first..

any help really appreciated!!

DD


"Matthias Englert" <menglert_news_nospam (AT) hotmail (DOT) com> wrote

Quote:
"Darren Drysdale" <darrend (AT) hotmail (DOT) com> schrieb im Newsbeitrag
news:%23kh23hmNEHA.1392 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
all

I'd really appreciate it if someone can help out with some mdx needed in
order to specify the default member from the time dimension - i need
this
to
be the latest /current month - imagine a 'snapshot month' dimension..
thre
users would like to see the current snapshot month and not, by default,
any
others..

If I have 2 dims - one for year and one for month the same type of code
is
applicable presumably?

many thanks

Darren



You can also use VBA!Date() in MDX with some formattings instead of Now()
to
create the month-name.

Regards,
Matthias





Reply With Quote
  #10  
Old   
Darren Drysdale
 
Posts: n/a

Default Re: MDX for latest month as Default member - 05-11-2004 , 11:06 AM



just to add.. my real dim also has year/quarter/month levels all in one
dimension...


"Darren Drysdale" <darrend (AT) hotmail (DOT) com> wrote

Quote:
Michael

i tried the code but the usually friendly sytax error came up.. I tried
usign Foodmart but no joy - the dim is called Time which i changed and
renamed all the names 9e.g. Month names) to English

My real date dimension is called calendar but I thought I'd try with
Foodmart first..

any help really appreciated!!

DD


"Matthias Englert" <menglert_news_nospam (AT) hotmail (DOT) com> wrote in message
news:OQ9k7vyNEHA.2500 (AT) TK2MSFTNGP12 (DOT) phx.gbl...
"Darren Drysdale" <darrend (AT) hotmail (DOT) com> schrieb im Newsbeitrag
news:%23kh23hmNEHA.1392 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
all

I'd really appreciate it if someone can help out with some mdx needed
in
order to specify the default member from the time dimension - i need
this
to
be the latest /current month - imagine a 'snapshot month' dimension..
thre
users would like to see the current snapshot month and not, by
default,
any
others..

If I have 2 dims - one for year and one for month the same type of
code
is
applicable presumably?

many thanks

Darren



You can also use VBA!Date() in MDX with some formattings instead of
Now()
to
create the month-name.

Regards,
Matthias







Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.