VincentHellin
VincentHellin

Reputation: 3

MDX to filter on a specific hiearachy and move (lag) on another hierarchy

I've some trouble with MDX to filter on a specific hiearachy and move (lag) on another hierarchy.

I've a dimension FinancialYear with 2 attributes :

Year (2014,2015,2016,2017,2018) 
Active (yes,no)

Here are the underlaying datas :

year/active
2014:no
2015:no
2016:yes
2017:no
2018:no

I would like to create a set with the previous year of the active yes. --> I want 2015.

Upvotes: 0

Views: 68

Answers (1)

Danylo Korostil
Danylo Korostil

Reputation: 1484

The following code must be the way to go:

{[FinancialYear].[Year].[Year].Members * [FinancialYear].[Active].&[yes]}.Item(0).Item(0).Lag(1)

Upvotes: 1

Related Questions