LASTPERIODS

LASTPERIODS

This documentation is for Kyvos 2026.5.x. To view documentation for other Kyvos versions, click here.

This documentation is for Kyvos 2026.5.x. To view documentation for other Kyvos versions, click here.

Description:

This function is used to return a set of members up to and including a specified member.

Syntax:

LastPeriods(Index [ ,Member_Expression ] )

Return Type:

SET

Parameters:

Parameter

Description

Parameter

Description

Member_Expression

It is a valid MDX expression that returns a member.

Index

A valid numeric expression that specifies a number of periods.

Example:

WITH MEMBER [Measures].[6 Month Average] AS AVG(LastPeriods(6, [Date].[Calendar].CurrentMember), [Measures].[Internet Sales Amount]) SELECT {[Measures].[Internet Sales Amount], [Measures].[6 Month Average]} ON COLUMNS, [Date].[Calendar].[Month].Members ON ROWS FROM [AdventureWorksMF_ValueBased]

Copyright Kyvos, Inc. 2026. All rights reserved.