Re: Dynamic Default member ?

From: Tom Chester (nospam_public_at_tomchester.net)
Date: 04/06/04


Date: Mon, 5 Apr 2004 23:13:10 -0700

Other than via a custom function, which has drawbacks, there's no way to
reference relational objects from MDX. Maybe you can join this param table
with your time dimension table, and then create a member property based on
the current date.

   public @ the domain below
   www.tomchester.net

"tristant" <krislioe@cbn.net.id> wrote in message
news:OUXTqw4GEHA.2848@TK2MSFTNGP10.phx.gbl...
> Hi All,
>
> I need to set default member of my time dimension to be 'Current Period'
of
> my system not based on system date , Now().
> The 'Current Period' of the system is stored in a record in Parameter File
/
> Table, a table that only has one record, Table : AppPara, Column :
> CurrPeriod (Int, YYYYMM).
> E.g : even if we are in April now by system date, but the period of the
> system is still 200403.
>
> MDX Expression below, instead of relying on Now() function, what if I
want
> to refer to the value of CurrPeriod in AppPara table ??
>
>
StrToMember("Time.["+Iif(Year(Now())>=1998,"1998",Str(Year(Now())))+"].[Q"+i
>
if(Month(Now())<=3,"1",iif(Month(Now())<=6,"2",iif(Month(Now())<=9,"3","4"))
> )+"].&["+Str(Month(Now()))+"]")
>
> Thank you for any help,
> Trist
>
>



Relevant Pages

  • RE: Current Time
    ... "HWUK" wrote: ... > Now I know not all time dimensions are built the same way, ... > So for October 2004 the resulting MDX value looked like this - ... This is why I wanted to use a member property on this matter, ...
    (microsoft.public.sqlserver.olap)
  • MDX
    ... I'd like to present member property in one column. ... My MDX ... NON EMPTY.members ... DIMENSION PROPERTIES.Name ON ROWS ...
    (microsoft.public.sqlserver.olap)
  • Re: Formula error- Property Name is not valid <Member key>"
    ... One dimension cannot be located on more than one axis at the same time. ... In your MDX, is from Measures which is already on Column axis. ... > I am new to MDX I am trying to access the member property of a cube. ...
    (microsoft.public.sqlserver.olap)
  • RE: Current Time
    ... Now I know not all time dimensions are built the same way, ... If the MDX doesn’t match your dimension it shouldn’t take long to figure the ... This is why I wanted to use a member property on this matter, ...
    (microsoft.public.sqlserver.olap)