JohnSLG


I would like to default my first parameter, which is year, to the current year. I'm querying against a cube. I've tried setting the default =Non-queried =year(today), tried a few MDX field names, and also tried setting the current year as the default in my data set. I can't seem to get the parameter to accept a default.



Re: Default parameter = current year

Adam Tappis - IMGroup


your parameter will be populated from a dataset query and the value column will be using the UniqueName proprty of the dimension members. This usually takes one of the following formats:

[DimensionName].[HierarchyName].[LevelName].&[MemberKey] OR

[DimensionName].[HierarchyName].&[MemberKey] - if your keys are unique within the dimension

The year level usually uses the year value for both key and name properties within the cube. The main thing is to match the format of the default value with what's being returned in your parameter dataset. A typical example might be

[Calendar].[Standard].[Year].&[2007]

to construct this using an expression use this:

="[Calendar].[Standard].[Year].&[" & Year(Now) & "]"







Re: Default parameter = current year

JohnSLG

DUH! I tried

[Date Shipped].[Fiscal Year].&[Year(Now)] and it didn't work.....I didn't know you had to put the thing in quotes if you wanted to use an expression.

THANKS!