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

Current Reporting Month and YTD calculations

$
0
0

Hi.

I'm trying to design a report in Excel based on a cube that will default to the current reporting month (which is actually last month), but still allow the user to select a different month to report on.  My date dimension table has a column called CurrentRepMonth, which is set to 'Current Reporting Month' for all days in the previous month.

My date dimension has a hierarchy of Year - Month - Date, and an attribute called 'Current Reporting Month'.

I have a calculation in my cube to get the YTD hours worked, based on the selected month:

CREATE MEMBER CURRENTCUBE.[Measures].[YTD - Hours Worked]
 AS AGGREGATE ( YTD ([Date].[Year -  Month -  Date].CurrentMember), [Measures].[Hours Worked]), 

In excel, if you select a month in the filter, the YTD calculation worked.  However, if you filter by Current Reporting Month, the calculation returns blank.

Any help is much appreciated.


Viewing all articles
Browse latest Browse all 2472

Trending Articles



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