iif([时间].currentmember.level.ordinal = 0,
tail((FILTER([时间].currentmember.firstchild.firstchild.firstchild.firstchild : [时间].currentmember.lastchild.lastchild.lastchild.lastchild,NOT ISEMPTY([Measures].[结存数量]))*{[Measures].[结存数量]}),1).Item(0),
iif([时间].currentmember.level.ordinal = 1,
tail((FILTER([时间].currentmember.firstchild.firstchild.firstchild : [时间].currentmember.lastchild.lastchild.lastchild,NOT ISEMPTY([Measures].[结存数量]))*{[Measures].[结存数量]}),1).Item(0),
iif([时间].currentmember.level.ordinal = 2,
tail((FILTER([时间].currentmember.firstchild.firstchild : [时间].currentmember.lastchild.lastchild,NOT ISEMPTY([Measures].[结存数量]))*{[Measures].[结存数量]}),1).Item(0),
iif([时间].currentmember.level.ordinal = 3,
tail((FILTER([时间].currentmember.firstchild : [时间].currentmember.lastchild,NOT ISEMPTY([Measures].[结存数量]))*{[Measures].[结存数量]}),1).Item(0),
([时间].currentmember,[Measures].[结存数量])
))))
下列语句执行效率更佳
iif([日期].currentmember.level.ordinal = 0,
tail((NonEmptyCrossjoin(( [日期].currentmember.firstchild.firstchild.firstchild.firstchild : [日期].currentmember.lastchild.lastchild.lastchild.lastchild),{([Measures].[结存数量])},1)),1).Item(0),
iif([日期].currentmember.level.ordinal = 1,
tail((NonEmptyCrossjoin(( [日期].currentmember.firstchild.firstchild.firstchild : [日期].currentmember.lastchild.lastchild.lastchild),{([Measures].[结存数量])},1)),1).Item(0),
iif([日期].currentmember.level.ordinal = 2,
tail((NonEmptyCrossjoin(([日期].currentmember.firstchild.firstchild : [日期].currentmember.lastchild.lastchild),{([Measures].[结存数量])},1)),1).Item(0),
iif([日期].currentmember.level.ordinal = 3,
tail((NonEmptyCrossjoin(([日期].currentmember.firstchild : [日期].currentmember.lastchild),{([Measures].[结存数量])},1)),1).Item(0),
([日期].currentmember,[Measures].[结存数量])
))))
tail((FILTER([时间].currentmember.firstchild.firstchild.firstchild.firstchild : [时间].currentmember.lastchild.lastchild.lastchild.lastchild,NOT ISEMPTY([Measures].[结存数量]))*{[Measures].[结存数量]}),1).Item(0),
iif([时间].currentmember.level.ordinal = 1,
tail((FILTER([时间].currentmember.firstchild.firstchild.firstchild : [时间].currentmember.lastchild.lastchild.lastchild,NOT ISEMPTY([Measures].[结存数量]))*{[Measures].[结存数量]}),1).Item(0),
iif([时间].currentmember.level.ordinal = 2,
tail((FILTER([时间].currentmember.firstchild.firstchild : [时间].currentmember.lastchild.lastchild,NOT ISEMPTY([Measures].[结存数量]))*{[Measures].[结存数量]}),1).Item(0),
iif([时间].currentmember.level.ordinal = 3,
tail((FILTER([时间].currentmember.firstchild : [时间].currentmember.lastchild,NOT ISEMPTY([Measures].[结存数量]))*{[Measures].[结存数量]}),1).Item(0),
([时间].currentmember,[Measures].[结存数量])
))))
下列语句执行效率更佳
iif([日期].currentmember.level.ordinal = 0,
tail((NonEmptyCrossjoin(( [日期].currentmember.firstchild.firstchild.firstchild.firstchild : [日期].currentmember.lastchild.lastchild.lastchild.lastchild),{([Measures].[结存数量])},1)),1).Item(0),
iif([日期].currentmember.level.ordinal = 1,
tail((NonEmptyCrossjoin(( [日期].currentmember.firstchild.firstchild.firstchild : [日期].currentmember.lastchild.lastchild.lastchild),{([Measures].[结存数量])},1)),1).Item(0),
iif([日期].currentmember.level.ordinal = 2,
tail((NonEmptyCrossjoin(([日期].currentmember.firstchild.firstchild : [日期].currentmember.lastchild.lastchild),{([Measures].[结存数量])},1)),1).Item(0),
iif([日期].currentmember.level.ordinal = 3,
tail((NonEmptyCrossjoin(([日期].currentmember.firstchild : [日期].currentmember.lastchild),{([Measures].[结存数量])},1)),1).Item(0),
([日期].currentmember,[Measures].[结存数量])
))))