There are 2 issues here, defining the current month and figuring out
where the current time member is in relation to it.
There are 2 common ways of figuring out the current month. One is to use
date/time functions to calculate the member name based of the actual
date. The other is to use the last non-empty month. You should be able
to find examples of both of these by searching this group in google.
One possible way to figure out if a given member is before the current
month would be to add a member property to the month either as an
incremental number or something in the form YYYYMM, then use the
following:
Quote:
|
IIF(CInt(Time.CurrentMember.Properties("MonthSeque nce")) <= CInt(Time.
|
[Current Month>]
,
<insert periods to date function here>
,
null
)
You could also use a set based approach, but this would not be as
efficient:
Quote:
|
IIF(COUNT(INTERSECT(Time.CurrentMember,Time.Month. members.item(0):time.
|
[<Current Month>])) = 1
,
<insert periods to date function here>
,
null
)
--
Regards
Darren Gosbell [MCSD]
Blog: http://www.geekswithblogs.net/darrengosbell
In article <1132353128.475425.240700 (AT) g49g2000cwa (DOT) googlegroups.com>,
grossk6309-signup1 (AT) yahoo (DOT) com says...
Quote:
I'm using the PeriodsToDate function to sum up a measure over time to
give me a running total for a given time member:
Sum(PeriodsToDate([Time].[(All)]), [Measures].[Ending Active Enrollment
Change])
For the most part it works great. However, I'll soon be expanding my
Time dimension to include 2006 and the powers that be don't want this
metric to be displyed for time members beyond the current month.
Any thoughts on how I could accomplish this? |