MDX: How to Calculate Last three Month Average

SUM(
    LastPeriods(
        3,
        PARALLELPERIOD(
            [Date].[CalenderHierarchy].[Month],
            1,
   Ancestor(
                [Date].[CalenderHierarchy].CURRENTMEMBER
               ,[Date].[CalenderHierarchy].[Month]
            )
        )
    )
    ,[Measures].[Count]
)

Comments

Popular posts from this blog

SSRS Report Design: Best Practices

SSAS OLAP Design - Best Practices

Enable Usage-Based Optimization in SSAS