0
votes

I have a multi-valued parameter TimeMonthOfYear(from cube) that contains January Februrary...December. I want to set a default value showing current month using MonthName(Month(Today)) (I tried it and it didn't work) when running report...

If I do this [Time].[Month Of Year].&[October] it works! October is selected in dropdown after previous dropdown (Year) was selected.

I don't want to do it the "hard coded" way...I have tried [Time].[Month Of Year].&[MonthName(Month(Today))] and ="[Time].[Month Of Year].&["&MonthName(Month(Today))&"]" without luck

Any help is very much appreciated!

1
Are you just missing parentheses after today? MonthName(Month(Today())) - Daniel E.
I've already tried that, thx though. Problem still exists - user2878785
How are you populating the parameter exactly, because default value of =MonthName(Month(Today())) works fine if I set up available values manually with values of the full text names. (Even with multi-select enabled.) If there is whitespace being passed in that may be messing up the exact match... - Daniel E.
is the year included in the parameter value? in that case you would probably have to append the year to =Month... with a similar expression for year. - Daniel E.
My parameter comes from a dimension called Time that has Month Of Year which consists of a list with months, January-December. I also have Year as another parameter. My parameter TimeMonthOfYear has some constrains ... , [Measures].[ParameterLevel]} ON COLUMNS , [Time].[Month Of Year].ALLMEMBERS ON ROWS FROM ( SELECT ( STRTOSET(@TimeYear, CONSTRAINED) ) ON COLUMNS FROM ( SELECT ( STRTOSET(@DimOrganisationDealerName, CONSTRAINED) ) ON COLUMNS FROM ...so I can't hard code the values in available values since it accepts only [Time].[Month Of Year].&[September] format - user2878785

1 Answers

0
votes

Yup :) Well it's now working with may be a not so nice solution but will work for now with the help of vb code. in standard value I have ="[Time].[Month Of Year].&[" + Code.SetMonth() + "]" and custom code Function SetMonth() As String Dim x as STRING x =CStr(MonthName(Month(Today))) 'CStr not needed I think If x = "januari" Then x = "January" ElseIf x = "februari" Then x = "February" ... End If Return(x) End Function That is giving me the current month after selecting value in year drop-down :)