Quantcast
Channel: SQL Server Analysis Services Forum
Viewing all articles
Browse latest Browse all 2472

Get current months MDX

$
0
0

Hi All,

I would like to get the current month based on the months members. I have tried like this but it is  displaying nothing

	SELECT
	{

			 [Measures].[Only]

            } 
    ON COLUMNS,

	LASTPERIODS(12,strtomember ("[BusinessDate].[YYYYMM].&[" + format(now(), "yyyyMM") + "]"))

/*  [BusinessDate].[YYYYMM].&[2012-11] */
      DIMENSION PROPERTIES 
    MEMBER_CAPTION
   ,MEMBER_UNIQUE_NAME
   ON ROWS   FROM [Cube]

Based on current month I want to display last 12 months data. I was bit struck to get the current months based on months member

Can anyone guide me through pls


Viewing all articles
Browse latest Browse all 2472

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>