Are you talking about picking up the first day of the current month
based on the system date?
You can do this sort of thing using the Now() function in conjunction
with the StrToMember() function. It is hard to give a generic answer as
this depends on the structure of your time dimension. Below is an
example that works with the Time dimension in the Foodmart 2000 sample
database.
WITH
MEMBER Measures.DateStr as '"[Time].[1997].[Q" + format(now(),"Q") +
"].[" + format(now(),"m") + "]"'
MEMBER Measures.DateNow as 'StrToMember("[Time].[1997].[Q" + format
(now(),"Q") + "].[" + format(now(),"m") + "]").UniqueName'
SELECT
{Measures.DateStr,Measures.DateNow} ON COLUMNS
FROM Sales
I am returning the uniquename in the string as it is an easy way of
seeing which member the calculation is choosing. Starting off with a
calculated member like DateStr is an easy way to debug your expression
to make sure it is returning the string you need before placing it in
the StrToMember function (which will just return #Err if it does not
work)
HTH
--
Regards
Darren Gosbell [MCSD]
Blog: http://www.geekswithblogs.net/darrengosbell
In article <1137556141.631610.149860 (AT) f14g2000cwb (DOT) googlegroups.com>,
anasttin (AT) excite (DOT) com says...
Quote:
Hi all,
Is there an MDX formula I can use to pick up the 1st day of the system
date? I've looked at the available formulas and can't see any date
related ones at all.
Any help much appreciated.
Kind regards |