开发者

How to calculate current month and next 6 months in an mdx query ?? Please help !

开发者 https://www.devze.com 2023-01-31 18:49 出处:网络
i want to calculate current month and n开发者_高级运维ext 6 months in an mdx query as columns..Please help !!I have tried this within MDX, and it can be a pain. String manipulation with VBA was the mo

i want to calculate current month and n开发者_高级运维ext 6 months in an mdx query as columns..Please help !!


I have tried this within MDX, and it can be a pain. String manipulation with VBA was the most accurate way, but there are MDX-only shortcuts (that can be unreliable). See this thread, which links to another: how to get latest date in mdx?


To get current month, you can use below code:

WITH MEMBER [Measures].[Current Month] AS VBAMDX.Format(VBAMDX.Now(),"MM") SELECT {[Measures].[Current Month]} ON COLUMNS FROM [Analysis Services Tutorial];

0

精彩评论

暂无评论...
验证码 换一张
取 消