Hi Lawrence,
Try this:
SELECT { LASTPERIODS (3, TAIL(nonempty([Week].[Week].[Week
Name].Members),1).Item(0) )
} ON COLUMNS FROM [GMDSummary]
The error message is telling you that the LastPeriods function takes a
member as an argument and you have specified a set. TAIL and HEAD functions
return sets, even if the set has only one member. You need to use the Item
function to take one member out of the set. In this case there is only one
member so you can use Item(0).
Hope this helps.
SHW
"Lawrence" wrote:
Quote:
Hello,
I am trying to retrieve the last 3 periods from the current month (ie Sept,
Oct, Nov). I am thinking that LastPeriods function might work, but I am
getting the following Error "The LASTPERIODS function expects a member
expression for the 0 argument. A tuple set expression was used." Here's the
code.
SELECT { LASTPERIODS (3, TAIL(nonempty([Week].[Week].[Week Name].Members)) )
} ON COLUMNS FROM [GMDSummary] |