MDX Help request - LastPeriods function

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: wantnospam_at_email.com ((wantnospam_at_email.com))
Date: 03/01/05


Date: Mon, 28 Feb 2005 21:38:56 -0800

Hi,

I need to calculate the average of one of my measure (called NetSales) for the last 3 months as per the following logic:

If my selected time period is Dec, then I want to get the average of the NetSales for Sep, Oct., and Nov.

I have tried using the LastPeriods function (as follows) but that returns the average of Oct., Nov., and Dec.

AVG(LastPeriods (3, [Time].CurrentMember), [Measures].[NetSales])

Any idea how I can get the desired result.

Many thanks in advance.

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...