Reputation: 35557
Is this the most trustworthy and efficient method of extracting the days for the past 5 months from a Date
dimension
{DESCENDANTS(
Tail([Date].[Date - Calendar Month].[Calendar Month].Members,5),
[Date].[Date - Calendar Month].[Calendar Day]
)}
I believe the dimension I'm querying is relatively standard:
Upvotes: 2
Views: 86
Reputation: 2217
You may prefer this alternative syntax:
{
DESCENDANTS(
{[Date].[Date - Calendar Month].[Calendar Month].LastChild.Lag(5) :
[Date].[Date - Calendar Month].[Calendar Month].LastChild}
, [Date].[Date - Calendar Month].[Calendar Day]
)
}
and optionally change
[Date].[Date - Calendar Month].[Calendar Month].LastChild
by another member expression
Upvotes: 3