I can′t get the current month,I have tried the following mdx without any result:
Code Snippet
Extract(Filter([Period].[Monthly].[Month].Members, [Period].[Monthly].CurrentMember.Properties("Current Period") ="-1"), [Period].[Monthly]).Item(0)
Code Snippet
Tail( Filter( [Date].[Date].Levels(3).Members, Not IsEmpty([Date].CurrentMember)), 1).item(1)Here is an example that will give you the most current calendar month in Adventure Works where the month has "reseller sales":
Tail(Exists([Date].[Calendar].[Month].Members,,"Reseller Sales"),1)(0)
The general form of the calculation is:
Tail(Exists(<<date dimension>>.<<date hierarchy>>.<<date level>>.Members,, "<<measure group>>"),1)(0)
HTH,
Steve
sql
No comments:
Post a Comment