Time Dimension: How to set Default Member to Current Month
i want set current month default member in time dimension. every time see data should display most current data.
i've tried lot in default member property not getting success.
thanks in advance
here example using adventure works cube. can add cube script adventure works cube , default day current date using now() function. had use (now() - 1000) set date 3/25/2004 due fact adventure works cube date dimension ends @ 8/31/2004, think idea. other thing note here [date].[date] attribute has "valuecolumn" defined of type "date". allows filter statement use straight date vs. date comparison.
-- now() = 12/19/2006
-- now() - 1000 = 3/25/2004
alter
cube currentcubeupdate
dimension [date],default_member
= tail(filter([date].[date].members,[date].[date].membervalue < (now() - 1000)),1)(0);hth,
steve
SQL Server > SQL Server Analysis Services
Comments
Post a Comment