The MDX PrevMember function returns the previous member along the same generation or level.
PrevMember ( member [,layertype ] )
The starting member from which PrevMember counts one member back.
GENERATION or LEVEL. The default is Generation.
with member [starting date].XXX as (prevMember(currentMember([measure])), [starting date].[2021])
select
members(measure) on 1,
{ [starting date].[2021], [starting date].XXX } on 0
from [logistics.test] where (Goods.[ALL].[household appliances].[television], Transport.[ALL].[ocean freight], [starting region].[ALL].[Europe].[UK], [ending region].[ALL].[Europe].[Italy], [starting date].[ALL].[2021].[Q2].[M4], [completion date].[ALL].[2020].[Q1].[M1]) ;
2021 | XXX | |
cost | 12 | 12 |
income | 266.64 | 12 |
quantity | 3006009 | 266.64 |