Labels

ASP.NET (1) Data Model (1) Django (1) MDX (15) Python (3) Redshift (3) SSAS (15) SSRS (3) T-SQL (29)

Tuesday, 12 June 2012

Named Set for Current Month Calculation

WITH SET [Calendar Months]
AS EXTRACT(STRTOMEMBER("[Date].[Month].&["+cstr(month(NOW ()))+"]",CONSTRAINED)
*{[Date].[Calendar Period].[Month]},[Date].[Calendar Period])
SELECT NON Empty[Calendar Months]  on Rows, [Measures]. [Actual Amount] on Columns FROM [Sales]

No comments:

Post a Comment