I would like to know if is possible have a YTD measure in a usually time dimension without show the year when I select the month.
when I select the YTD and select the month not summarize, just show me the month import, no accumulate.
sum(ytd([Time].[Time].currentmember),[MEASURES].[IMPORT])
I would like to know if is possible YTD summarize when I select the month without the year.
In a post I found a solution with a scope, but the result is not what I expected (I'm sure I'm doing something wrong)
SCOPE([TIME].[YEAR].members,[TIME].[TIME].[MONTH].members);
([measures].[Margen YTD Time]=
SUM(
CrossJoin(
{[MEASURES].[IMPORT]},
PeriodsToDate([TIME].[TIME].[YEAR]
)
)
)
);
End Scope;
the result:


In your scope assignment, there seems to be a confusion in using PeriodsToDate with [TIME].[TIME].[YEAR], which might be not right referencing level needed for YTD aggregation. The PeriodsToDate function should ideally be used with the correct level argument that identifies the "Year" level within your time dimension to roll up values from the beginning of the year to the current period.
Your IMPORT YTD shoulf be like :
and using the SCOPE :