Quantcast
Channel: SQL Server Analysis Services forum
Viewing all articles
Browse latest Browse all 14337

MDX Sum of YTD (returning NULL)

$
0
0

Hello,

I am trying to write what should be a simple MDX script as a CALCULATED MEMBER in SSAS 2012.  I am trying to create a measure that is a YTD Sum of Current Month Actual.

My Time Dimension is "FISCAL PERIOD" and is established as follows:

FISCAL YEAR = Year

FISCAL DATE = Date   (This is a date field that is just the 1st of every month)

The Key on this Dimension is FISCAL PERIOD which is in the format YYYYMM and is not assigned as a Time Field because I am not sure what to assign it to.

The Relationship for the Dimension is FISCAL PERIOD --> FISCAL DATE --> FISCAL YEAR

This Dimension has a relationship to the Measure via FISCAL PERIOD

The MDX for the Calculated Measure is:

CREATE MEMBER CURRENTCUBE.[Measures].YTD_Actual
 AS sum(YTD([FISCAL PERIOD].[Fiscal Date].CurrentMember),[Measures].[Current Month Actual]), 
VISIBLE = 1 ,  ASSOCIATED_MEASURE_GROUP = 'VW BUDGET VS ACTUAL';

I am able to process the cube without error.  However, the YTD_Actual measure returns a NULL, even if I filter on a specific FISCAL DATE.

Anyone have any thought?

Steven




Viewing all articles
Browse latest Browse all 14337

Trending Articles



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