Microsoft KB Archive/248615

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 13:50, 21 July 2020 by X010 (talk | contribs) (Text replacement - """ to """)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Base


FIX: Dimension Wizard Calculates Years Incorrectly On Time Dimensions

Article ID: 248615

Article Last Modified on 3/14/2006



APPLIES TO

  • Microsoft SQL Server OLAP Services



This article was previously published under Q248615

BUG #: 1356 (plato7x)

SYMPTOMS

When a user creates a time dimension using the OLAP Manager dimension wizard and selects a year to be a non-calendar year (such as fiscal years starting on October 1st), the year part of the date is created incorrectly. For example, October 1 1997 to September 30 1998 is created as year 1997 rather than year 1998.

WORKAROUND

After the dimension has been created, you can change the Member Key Column property of the year level in the dimension editor. This property typically defines the SELECT part of the SQL statement sent to the underlying relational database. In the preceding example, with SQL Server as the underlying database, the Member Key Column property of year level shows the following formula in dimension editor:

DatePart('yyyy',iif (Month("time_by_day"."the_date") < 10 or
(Month("time_by_day"."the_date") = 10 and
Day("time_by_day"."the_date") < 1),DateAdd('yyyy', -1,
"time_by_day"."the_date"), "time_by_day"."the_date"))
                

However, you can change the formula manually as follows to attain the desired result:

DatePart('yyyy',iif (Month("time_by_day"."the_date") < 10 or
(Month("time_by_day"."the_date") = 10 and
Day("time_by_day"."the_date") < 1),"time_by_day"."the_date",
DateAdd('yyyy', 1, "time_by_day"."the_date")))
                

STATUS

Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 2 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

254561 INF: How to Obtain Service Pack 2 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0


For more information, contact your primary support provider.

Keywords: kbbug kbfix KB248615