Hi Peter,
Thank you very much for helping me.
I belive I am doing exactly same thing as you, but I am getting different
results. Is it possible for you to test this on 64bit machine with Developer
Edition SQL Server 2005?
There is more info about our environment:
From the msmdsrv.exe file properties
Product version : 9.0.2047.0
File version: 2005.090.2047.00
Platform: NT AMD64 (Note - we actually have Intel 64bit, not sure why it
says here AMD)
I created SQL SErver database with 2 tables: Date and Fact. I attached
script bellow for that.
Then I created analysis services project and create dimension [Date] and
measure group [Time Test]
I added time intelligence calculation and then changed it to:
Create Member CurrentCube.[Date].[Date Date Calculations].[Allways100] As
"NA" ;
Scope({[Measures].[Amount]}) ;
([Date].[Date Date Calculations].[Allways100],[Date].[Day].Members) = 100;
End Scope ;
I execute following query:
SELECT {[Measures].[Amount]} ON 0
, {[Date].[Date].Members} ON 1
FROM [Time Test]
WHERE ([Date].[Date Date Calculations].[Allways100])
Results are:
Amount
All 100
2006 100
200611 100
20061129 NA
20061130 NA
200612 100
20061201 NA
20061202 NA
20061203 NA
So, from what I see, we are both doing the same thing, but getting different
results. Is it possible for you to test my code on 64bit machine?
Thank you again for helping me.
There is a script I am using for test:
To create and laod SQL Server database:
CREATE DATABASE TimeTest
go
USE TimeTest
go
CREATE TABLE dbo.Date (DayKey int NOT NULL, MonthKey int NOT NULL, YearKey
smallint NOT NULL)
go
ALTER TABLE dbo.Date ADD CONSTRAINT PK_Date PRIMARY KEY(DayKey)
go
INSERT INTO dbo.Date(DayKey, MonthKey, YearKey) VALUES(20061129, 200611,
2006)
INSERT INTO dbo.Date(DayKey, MonthKey, YearKey) VALUES(20061130, 200611,
2006)
INSERT INTO dbo.Date(DayKey, MonthKey, YearKey) VALUES(20061201, 200612,
2006)
INSERT INTO dbo.Date(DayKey, MonthKey, YearKey) VALUES(20061202, 200612,
2006)
INSERT INTO dbo.Date(DayKey, MonthKey, YearKey) VALUES(20061203, 200612,
2006)
go
CREATE TABLE dbo.Fact (DayKey int NOT NULL, amount int NOT NULL)
go
INSERT INTO dbo.Fact(DayKey, Amount) VALUES(20061129, 1)
INSERT INTO dbo.Fact(DayKey, Amount) VALUES(20061130, 2)
INSERT INTO dbo.Fact(DayKey, Amount) VALUES(20061201, 3)
INSERT INTO dbo.Fact(DayKey, Amount) VALUES(20061202, 4)
INSERT INTO dbo.Fact(DayKey, Amount) VALUES(20061203, 5)
INSERT INTO dbo.Fact(DayKey, Amount) VALUES(20061203, 6)
go
ALTER TABLE dbo.Fact ADD CONSTRAINT FK_Fact_Date FOREIGN KEY(DayKey)
REFERENCES dbo.Date(DayKey)
go
<Create xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
<ObjectDefinition>
<Database xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ID>TimeTestForMS</ID>
<Name>TimeTestForMS</Name>
<Language>1033</Language>
<Collation>Latin1_General_CI_AS</Collation>
<DataSourceImpersonationInfo>
<ImpersonationMode>Default</ImpersonationMode>
</DataSourceImpersonationInfo>
<Dimensions>
<Dimension>
<ID>Date</ID>
<Name>Date</Name>
<Annotations>
<Annotation>
<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0

iagramLayout</Name>
<Value>
<dds xmlns="">
<diagram fontclsid="{0BE35203-8F91-11CE-9DE3-00AA004BB851}"
mouseiconclsid="{0BE35204-8F91-11CE-9DE3-00AA004BB851}"
defaultlayout="MSDDS.Rectilinear" defaultlineroute="MSDDS.Rectilinear"
version="7" nextobject="2" scale="100" pagebreakanchorx="0"
pagebreakanchory="0" pagebreaksizex="0" pagebreaksizey="0"
scrollleft="-1933" scrolltop="-8956" gridx="150" gridy="150" marginx="5000"
marginy="5000" zoom="100" x="6906" y="20214" backcolor="15334399"
defaultpersistence="2" PrintPageNumbersMode="3" PrintMarginTop="0"
PrintMarginBottom="635" PrintMarginLeft="0" PrintMarginRight="0"
marqueeselectionmode="0" mousepointer="0" snaptogrid="0"
autotypeannotation="1" showscrollbars="0" viewpagebreaks="0"
donotforceconnectorsbehindshapes="1"
backpictureclsid="{00000000-0000-0000-0000-000000000000}">
<font>
<ddsxmlobjectstreamwrapper binary="01000000900144420100065461686f6d61" />
</font>
<mouseicon>
<ddsxmlobjectstreamwrapper binary="6c74000000000000" />
</mouseicon>
</diagram>
<layoutmanager>
<ddsxmlobj />
</layoutmanager>
<ddscontrol controlprogid="DdsShapes.DdsObjectManagedBridge.1" tooltip="Date
(dbo.Date)" left="20" top="0" logicalid="1" controlid="1" masterid="0"
hint1="0" hint2="0" width="3000" height="2302" noresize="0" nomove="0"
nodefaultattachpoints="0" autodrag="1" usedefaultiddshape="1" selectable="1"
showselectionhandles="1" allownudging="1" isannotation="0"
dontautolayout="0" groupcollapsed="0" tabstop="1" visible="1"
snaptogrid="0">
<control>
<ddsxmlobjectstreaminitwrapper binary="00080000b80b0000fe080000" />
</control>
<layoutobject>
<ddsxmlobj>
<property name="LogicalObject" value="dbo_Date" vartype="8" />
</ddsxmlobj>
</layoutobject>
<shape groupshapeid="0" groupnode="0" />
</ddscontrol>
</dds>
</Value>
</Annotation>
<Annotation>
<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:ShowFriendlyNames</Name>
<Value>true</Value>
</Annotation>
<Annotation>
<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:ShowRelationshipNames</Name>
<Value>false</Value>
</Annotation>
<Annotation>
<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:UseDiagramDefaultLayout</Name>
<Value>true</Value>
</Annotation>
<Annotation>
<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0

iagramViewPortLeft</Name>
<Value>-1933</Value>
</Annotation>
<Annotation>
<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0

iagramViewPortTop</Name>
<Value>-8956</Value>
</Annotation>
<Annotation>
<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0

iagramBoundingLeft</Name>
<Value>20</Value>
</Annotation>
<Annotation>
<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0

iagramBoundingTop</Name>
<Value>0</Value>
</Annotation>
<Annotation>
<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0

iagramZoom</Name>
<Value>100</Value>
</Annotation>
</Annotations>
<Source xsi:type="DataSourceViewBinding">
<DataSourceViewID>Time Test</DataSourceViewID>
</Source>
<Type>Time</Type>
<Language>1033</Language>
<Collation>Latin1_General_CI_AS</Collation>
<UnknownMemberName>Unknown</UnknownMemberName>
<Attributes>
<Attribute>
<ID>Year Key</ID>
<Name>Year</Name>
<Type>Years</Type>
<KeyColumns>
<KeyColumn>
<DataType>SmallInt</DataType>
<DataSize>-1</DataSize>
<Source xsi:type="ColumnBinding">
<TableID>dbo_Date</TableID>
<ColumnID>YearKey</ColumnID>
</Source>
</KeyColumn>
</KeyColumns>
<NameColumn>
<DataType>WChar</DataType>
<DataSize>-1</DataSize>
<Source xsi:type="ColumnBinding">
<TableID>dbo_Date</TableID>
<ColumnID>YearKey</ColumnID>
</Source>
</NameColumn>
<OrderBy>Key</OrderBy>
</Attribute>
<Attribute>
<ID>Month Key</ID>
<Name>Month</Name>
<Type>Months</Type>
<KeyColumns>
<KeyColumn>
<DataType>Integer</DataType>
<DataSize>-1</DataSize>
<Source xsi:type="ColumnBinding">
<TableID>dbo_Date</TableID>
<ColumnID>MonthKey</ColumnID>
</Source>
</KeyColumn>
</KeyColumns>
<NameColumn>
<DataType>WChar</DataType>
<DataSize>-1</DataSize>
<Source xsi:type="ColumnBinding">
<TableID>dbo_Date</TableID>
<ColumnID>MonthKey</ColumnID>
</Source>
</NameColumn>
<AttributeRelationships>
<AttributeRelationship>
<AttributeID>Year Key</AttributeID>
<Name>Year</Name>
</AttributeRelationship>
</AttributeRelationships>
<OrderBy>Key</OrderBy>
</Attribute>
<Attribute>
<ID>Day Key</ID>
<Name>Day</Name>
<Type>Days</Type>
<Usage>Key</Usage>
<KeyColumns>
<KeyColumn>
<DataType>Integer</DataType>
<DataSize>-1</DataSize>
<Source xsi:type="ColumnBinding">
<TableID>dbo_Date</TableID>
<ColumnID>DayKey</ColumnID>
</Source>
</KeyColumn>
</KeyColumns>
<NameColumn>
<DataType>WChar</DataType>
<DataSize>-1</DataSize>
<Source xsi:type="ColumnBinding">
<TableID>dbo_Date</TableID>
<ColumnID>DayKey</ColumnID>
</Source>
</NameColumn>
<AttributeRelationships>
<AttributeRelationship>
<AttributeID>Month Key</AttributeID>
<Name>Month</Name>
</AttributeRelationship>
<AttributeRelationship>
<AttributeID>Date Date Calculations</AttributeID>
<Name>Date Date Calculations</Name>
</AttributeRelationship>
</AttributeRelationships>
<OrderBy>Key</OrderBy>
</Attribute>
<Attribute>
<ID>Date Date Calculations</ID>
<Name>Date Date Calculations</Name>
<KeyColumns>
<KeyColumn>
<DataType>WChar</DataType>
<DataSize>15</DataSize>
<Source xsi:type="ColumnBinding">
<TableID>dbo_Date</TableID>
<ColumnID>Date_x0020_Date_x0020_Calculations</ColumnID>
</Source>
</KeyColumn>
</KeyColumns>
<NameColumn>
<DataType>WChar</DataType>
<DataSize>15</DataSize>
<Source xsi:type="ColumnBinding">
<TableID>dbo_Date</TableID>
<ColumnID>Date_x0020_Date_x0020_Calculations</ColumnID>
</Source>
</NameColumn>
<DefaultMember>[Date Date Calculations].[Current Date]</DefaultMember>
<IsAggregatable>false</IsAggregatable>
</Attribute>
</Attributes>
<Hierarchies>
<Hierarchy>
<ID>Year Key - Month Key - Day Key</ID>
<Name>Date</Name>
<AllMemberName>All</AllMemberName>
<Levels>
<Level>
<ID>Year Key</ID>
<Name>Year</Name>
<SourceAttributeID>Year Key</SourceAttributeID>
</Level>
<Level>
<ID>Month Key</ID>
<Name>Month</Name>
<SourceAttributeID>Month Key</SourceAttributeID>
</Level>
<Level>
<ID>Day Key</ID>
<Name>Day</Name>
<SourceAttributeID>Day Key</SourceAttributeID>
</Level>
</Levels>
</Hierarchy>
</Hierarchies>
<ProactiveCaching>
<SilenceInterval>-PT1S</SilenceInterval>
<Latency>-PT1S</Latency>
<SilenceOverrideInterval>-PT1S</SilenceOverrideInterval>
<ForceRebuildInterval>-PT1S</ForceRebuildInterval>
<Source xsi:type="ProactiveCachingInheritedBinding" />
</ProactiveCaching>
</Dimension>
</Dimensions>
<Cubes>
<Cube>
<ID>Time Test</ID>
<Name>Time Test</Name>
<Annotations>
<Annotation>
<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0

iagramLayout</Name>
<Value>
<dds xmlns="">
<diagram fontclsid="{0BE35203-8F91-11CE-9DE3-00AA004BB851}"
mouseiconclsid="{0BE35204-8F91-11CE-9DE3-00AA004BB851}"
defaultlayout="MSDDS.Rectilinear" defaultlineroute="MSDDS.Rectilinear"
version="7" nextobject="4" scale="100" pagebreakanchorx="0"
pagebreakanchory="0" pagebreaksizex="0" pagebreaksizey="0"
scrollleft="-6669" scrolltop="-6817" gridx="150" gridy="150" marginx="5000"
marginy="5000" zoom="100" x="16378" y="20214" backcolor="15334399"
defaultpersistence="2" PrintPageNumbersMode="3" PrintMarginTop="0"
PrintMarginBottom="635" PrintMarginLeft="0" PrintMarginRight="0"
marqueeselectionmode="0" mousepointer="0" snaptogrid="0"
autotypeannotation="1" showscrollbars="0" viewpagebreaks="0"
donotforceconnectorsbehindshapes="1"
backpictureclsid="{00000000-0000-0000-0000-000000000000}">
<font>
<ddsxmlobjectstreamwrapper binary="01000000900144420100065461686f6d61" />
</font>
<mouseicon>
<ddsxmlobjectstreamwrapper binary="6c74000000000000" />
</mouseicon>
</diagram>
<layoutmanager>
<ddsxmlobj />
</layoutmanager>
<ddscontrol controlprogid="DdsShapes.DdsObjectManagedBridge.1" tooltip="Fact
(dbo.Fact)" left="20" top="4702" logicalid="1" controlid="1" masterid="0"
hint1="0" hint2="0" width="3000" height="1879" noresize="0" nomove="0"
nodefaultattachpoints="0" autodrag="1" usedefaultiddshape="1" selectable="1"
showselectionhandles="1" allownudging="1" isannotation="0"
dontautolayout="0" groupcollapsed="0" tabstop="1" visible="1"
snaptogrid="0">
<control>
<ddsxmlobjectstreaminitwrapper binary="00080000b80b000057070000" />
</control>
<layoutobject>
<ddsxmlobj>
<property name="LogicalObject" value="dbo_Fact" vartype="8" />
</ddsxmlobj>
</layoutobject>
<shape groupshapeid="0" groupnode="0" />
</ddscontrol>
<ddscontrol controlprogid="DdsShapes.DdsObjectManagedBridge.1" tooltip="Date
(dbo.Date)" left="20" top="0" logicalid="2" controlid="2" masterid="0"
hint1="0" hint2="0" width="3000" height="2302" noresize="0" nomove="0"
nodefaultattachpoints="0" autodrag="1" usedefaultiddshape="1" selectable="1"
showselectionhandles="1" allownudging="1" isannotation="0"
dontautolayout="0" groupcollapsed="0" tabstop="1" visible="1"
snaptogrid="0">
<control>
<ddsxmlobjectstreaminitwrapper binary="00080000b80b0000fe080000" />
</control>
<layoutobject>
<ddsxmlobj>
<property name="LogicalObject" value="dbo_Date" vartype="8" />
</ddsxmlobj>
</layoutobject>
<shape groupshapeid="0" groupnode="0" />
</ddscontrol>
<ddscontrol controlprogid="MSDDS.Polyline" left="1121" top="1803"
logicalid="3" controlid="3" masterid="0" hint1="0" hint2="0" width="799"
height="3199" noresize="0" nomove="0" nodefaultattachpoints="1" autodrag="0"
usedefaultiddshape="0" selectable="1" showselectionhandles="0"
allownudging="1" isannotation="0" dontautolayout="0" groupcollapsed="0"
tabstop="1" visible="1" snaptogrid="0">
<control>
<ddsxmlobj>
<polyline endtypedst="6" endtypesrc="3" usercolor="0" linestyle="0"
linerender="1" customendtypedstid="0" customendtypesrcid="0"
adornsvisible="1" />
</ddsxmlobj>
</control>
<layoutobject>
<ddsxmlobj>
<property name="LogicalObject" value="dataSet.Relations[FK_Fact_Date]"
vartype="8" />
<property name="Virtual" value="0" vartype="11" />
<property name="VisibleAP" value="0" vartype="3" />
</ddsxmlobj>
</layoutobject>
<connector lineroutestyle="MSDDS.Rectilinear" sourceid="2" destid="1"
sourceattachpoint="5" destattachpoint="4" segmenteditmode="0"
bendpointeditmode="0" bendpointvisibility="0" relatedid="0" virtual="0">
<point x="1520" y="2302" />
<point x="1520" y="4702" />
</connector>
</ddscontrol>
</dds>
</Value>
</Annotation>
<Annotation>
<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:ShowFriendlyNames</Name>
<Value>true</Value>
</Annotation>
<Annotation>
<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:ShowRelationshipNames</Name>
<Value>false</Value>
</Annotation>
<Annotation>
<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:UseDiagramDefaultLayout</Name>
<Value>true</Value>
</Annotation>
<Annotation>
<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0

iagramViewPortLeft</Name>
<Value>-6669</Value>
</Annotation>
<Annotation>
<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0

iagramViewPortTop</Name>
<Value>-6817</Value>
</Annotation>
<Annotation>
<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0

iagramBoundingLeft</Name>
<Value>20</Value>
</Annotation>
<Annotation>
<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0

iagramBoundingTop</Name>
<Value>0</Value>
</Annotation>
<Annotation>
<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0

iagramZoom</Name>
<Value>100</Value>
</Annotation>
</Annotations>
<Language>1033</Language>
<Collation>Latin1_General_CI_AS</Collation>
<Dimensions>
<Dimension>
<ID>Date</ID>
<Name>Date</Name>
<DimensionID>Date</DimensionID>
<Attributes>
<Attribute>
<AttributeID>Year Key</AttributeID>
</Attribute>
<Attribute>
<AttributeID>Month Key</AttributeID>
</Attribute>
<Attribute>
<AttributeID>Day Key</AttributeID>
</Attribute>
<Attribute>
<AttributeID>Date Date Calculations</AttributeID>
</Attribute>
</Attributes>
<Hierarchies>
<Hierarchy>
<HierarchyID>Year Key - Month Key - Day Key</HierarchyID>
</Hierarchy>
</Hierarchies>
</Dimension>
</Dimensions>
<MeasureGroups>
<MeasureGroup>
<ID>Fact</ID>
<Name>Fact</Name>
<Measures>
<Measure>
<ID>Amount</ID>
<Name>Amount</Name>
<DataType>Integer</DataType>
<Source>
<DataType>Integer</DataType>
<Source xsi:type="ColumnBinding">
<TableID>dbo_Fact</TableID>
<ColumnID>amount</ColumnID>
</Source>
</Source>
</Measure>
</Measures>
<StorageMode>Molap</StorageMode>
<ProcessingMode>Regular</ProcessingMode>
<Dimensions>
<Dimension xsi:type="RegularMeasureGroupDimension">
<CubeDimensionID>Date</CubeDimensionID>
<Attributes>
<Attribute>
<AttributeID>Year Key</AttributeID>
<KeyColumns>
<KeyColumn>
<DataType>SmallInt</DataType>
<DataSize>-1</DataSize>
<Source xsi:type="InheritedBinding" />
</KeyColumn>
</KeyColumns>
</Attribute>
<Attribute>
<AttributeID>Month Key</AttributeID>
<KeyColumns>
<KeyColumn>
<DataType>Integer</DataType>
<DataSize>-1</DataSize>
<Source xsi:type="InheritedBinding" />
</KeyColumn>
</KeyColumns>
</Attribute>
<Attribute>
<AttributeID>Day Key</AttributeID>
<KeyColumns>
<KeyColumn>
<DataType>Integer</DataType>
<DataSize>-1</DataSize>
<Source xsi:type="ColumnBinding">
<TableID>dbo_Fact</TableID>
<ColumnID>DayKey</ColumnID>
</Source>
</KeyColumn>
</KeyColumns>
<Type>Granularity</Type>
</Attribute>
<Attribute>
<AttributeID>Date Date Calculations</AttributeID>
<KeyColumns>
<KeyColumn>
<DataType>WChar</DataType>
<DataSize>15</DataSize>
<Source xsi:type="InheritedBinding" />
</KeyColumn>
</KeyColumns>
</Attribute>
</Attributes>
</Dimension>
</Dimensions>
<Partitions>
<Partition>
<ID>Fact</ID>
<Name>Fact</Name>
<Source xsi:type="DsvTableBinding">
<DataSourceViewID>Time Test</DataSourceViewID>
<TableID>dbo_Fact</TableID>
</Source>
<StorageMode>Molap</StorageMode>
<ProcessingMode>Regular</ProcessingMode>
<ProactiveCaching>
<SilenceInterval>-PT1S</SilenceInterval>
<Latency>-PT1S</Latency>
<SilenceOverrideInterval>-PT1S</SilenceOverrideInterval>
<ForceRebuildInterval>-PT1S</ForceRebuildInterval>
<Source xsi:type="ProactiveCachingInheritedBinding" />
</ProactiveCaching>
</Partition>
</Partitions>
<ProactiveCaching>
<SilenceInterval>-PT1S</SilenceInterval>
<Latency>-PT1S</Latency>
<SilenceOverrideInterval>-PT1S</SilenceOverrideInterval>
<ForceRebuildInterval>-PT1S</ForceRebuildInterval>
<Source xsi:type="ProactiveCachingInheritedBinding" />
</ProactiveCaching>
</MeasureGroup>
</MeasureGroups>
<Source>
<DataSourceViewID>Time Test</DataSourceViewID>
</Source>
<MdxScripts>
<MdxScript>
<ID>MdxScript</ID>
<Name>MdxScript</Name>
<Commands>
<Command>
<Text>/*
The CALCULATE command controls the aggregation of leaf cells in the cube.
If deleted or modified, the data within the cube will be affected.
This command should only be edited if you intend on manually specifying how
the cube will be aggregated.
*/
CALCULATE;
Create Member CurrentCube.[Date].[Date Date Calculations].[Allways100] As
"NA" ;
Scope({[Measures].[Amount]}) ;
([Date].[Date Date Calculations].[Allways100]
,[Date].[Day].Members) = 100;
End Scope ;
</Text>
</Command>
</Commands>
</MdxScript>
</MdxScripts>
<ProactiveCaching>
<SilenceInterval>-PT1S</SilenceInterval>
<Latency>-PT1S</Latency>
<SilenceOverrideInterval>-PT1S</SilenceOverrideInterval>
<ForceRebuildInterval>-PT1S</ForceRebuildInterval>
<Source xsi:type="ProactiveCachingInheritedBinding" />
</ProactiveCaching>
</Cube>
</Cubes>
<DataSources>
<DataSource xsi:type="RelationalDataSource">
<ID>Time Test</ID>
<Name>Time Test</Name>
<ConnectionString>Provider=SQLNCLI.1;Data Source=IDS-DB4;Integrated
Security=SSPI;Initial Catalog=TimeTest</ConnectionString>
<ImpersonationInfo>
<ImpersonationMode>ImpersonateServiceAccount</ImpersonationMode>
</ImpersonationInfo>
<Timeout>PT0S</Timeout>
</DataSource>
</DataSources>
<DataSourceViews>
<DataSourceView>
<ID>Time Test</ID>
<Name>Time Test</Name>
<Annotations>
<Annotation>
<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:ShowFriendlyNames</Name>
<Value>true</Value>
</Annotation>
<Annotation>
<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:CurrentLayout</Name>
<Value>_ALL_TABLES_</Value>
</Annotation>
<Annotation>
<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:SchemaRestriction</Name>
</Annotation>
<Annotation>
<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:RetrieveRelationships</Name>
<Value>true</Value>
</Annotation>
<Annotation>
<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:Layouts</Name>
<Value>
<Layouts xmlns="">
<Diagram>
<Name>_ALL_TABLES_</Name>
<DiagramLayout>
<dds>
<diagram fontclsid="{0BE35203-8F91-11CE-9DE3-00AA004BB851}"
mouseiconclsid="{0BE35204-8F91-11CE-9DE3-00AA004BB851}"
defaultlayout="MSDDS.Rectilinear" defaultlineroute="MSDDS.Rectilinear"
version="7" nextobject="4" scale="100" pagebreakanchorx="0"
pagebreakanchory="0" pagebreaksizex="0" pagebreaksizey="0"
scrollleft="-7714" scrolltop="-7478" gridx="150" gridy="150" marginx="5000"
marginy="5000" zoom="100" x="18468" y="21537" backcolor="15334399"
defaultpersistence="2" PrintPageNumbersMode="3" PrintMarginTop="0"
PrintMarginBottom="635" PrintMarginLeft="0" PrintMarginRight="0"
marqueeselectionmode="0" mousepointer="0" snaptogrid="0"
autotypeannotation="1" showscrollbars="0" viewpagebreaks="0"
donotforceconnectorsbehindshapes="1"
backpictureclsid="{00000000-0000-0000-0000-000000000000}">
<font>
<ddsxmlobjectstreamwrapper binary="01000000900144420100065461686f6d61" />
</font>
<mouseicon>
<ddsxmlobjectstreamwrapper binary="6c74000000000000" />
</mouseicon>
</diagram>
<layoutmanager>
<ddsxmlobj />
</layoutmanager>
<ddscontrol controlprogid="DdsShapes.DdsObjectManagedBridge.1" tooltip="Date
(dbo.Date)" left="20" top="4279" logicalid="1" controlid="1" masterid="0"
hint1="0" hint2="0" width="3000" height="2302" noresize="0" nomove="0"
nodefaultattachpoints="0" autodrag="1" usedefaultiddshape="1" selectable="1"
showselectionhandles="1" allownudging="1" isannotation="0"
dontautolayout="0" groupcollapsed="0" tabstop="1" visible="1"
snaptogrid="0">
<control>
<ddsxmlobjectstreaminitwrapper binary="00080000b80b0000fe080000" />
</control>
<layoutobject>
<ddsxmlobj>
<property name="LogicalObject" value="dbo_Date" vartype="8" />
</ddsxmlobj>
</layoutobject>
<shape groupshapeid="0" groupnode="0" />
</ddscontrol>
<ddscontrol controlprogid="DdsShapes.DdsObjectManagedBridge.1" tooltip="Fact
(dbo.Fact)" left="20" top="0" logicalid="2" controlid="2" masterid="0"
hint1="0" hint2="0" width="3000" height="1879" noresize="0" nomove="0"
nodefaultattachpoints="0" autodrag="1" usedefaultiddshape="1" selectable="1"
showselectionhandles="1" allownudging="1" isannotation="0"
dontautolayout="0" groupcollapsed="0" tabstop="1" visible="1"
snaptogrid="0">
<control>
<ddsxmlobjectstreaminitwrapper binary="00080000b80b000057070000" />
</control>
<layoutobject>
<ddsxmlobj>
<property name="LogicalObject" value="dbo_Fact" vartype="8" />
</ddsxmlobj>
</layoutobject>
<shape groupshapeid="0" groupnode="0" />
</ddscontrol>
<ddscontrol controlprogid="MSDDS.Polyline" left="1121" top="1579"
logicalid="3" controlid="3" masterid="0" hint1="0" hint2="0" width="799"
height="3200" noresize="0" nomove="0" nodefaultattachpoints="1" autodrag="0"
usedefaultiddshape="0" selectable="1" showselectionhandles="0"
allownudging="1" isannotation="0" dontautolayout="0" groupcollapsed="0"
tabstop="1" visible="1" snaptogrid="0">
<control>
<ddsxmlobj>
<polyline endtypedst="6" endtypesrc="3" usercolor="0" linestyle="0"
linerender="1" customendtypedstid="0" customendtypesrcid="0"
adornsvisible="1" />
</ddsxmlobj>
</control>
<layoutobject>
<ddsxmlobj>
<property name="LogicalObject" value="dataSet.Relations[FK_Fact_Date]"
vartype="8" />
<property name="Virtual" value="0" vartype="11" />
<property name="VisibleAP" value="0" vartype="3" />
</ddsxmlobj>
</layoutobject>
<connector lineroutestyle="MSDDS.Rectilinear" sourceid="1" destid="2"
sourceattachpoint="4" destattachpoint="5" segmenteditmode="0"
bendpointeditmode="0" bendpointvisibility="0" relatedid="0" virtual="0">
<point x="1520" y="4279" />
<point x="1520" y="1879" />
</connector>
</ddscontrol>
</dds>
</DiagramLayout>
<ShowRelationshipNames>False</ShowRelationshipNames>
<UseDiagramDefaultLayout>True</UseDiagramDefaultLayout>
<DiagramViewPortLeft>-7714</DiagramViewPortLeft>
<DiagramViewPortTop>-7478</DiagramViewPortTop>
<DiagramBoundingLeft>0</DiagramBoundingLeft>
<DiagramBoundingTop>0</DiagramBoundingTop>
<DiagramZoom>100</DiagramZoom>
</Diagram>
</Layouts>
</Value>
</Annotation>
</Annotations>
<DataSourceID>Time Test</DataSourceID>
<Schema>
<xs:schema id="Time_x0020_Test" xmlns=""
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
xmlns:msprop="urn:schemas-microsoft-com:xml-msprop">
<xs:element name="Time_x0020_Test" msdata:IsDataSet="true"
msdata:UseCurrentLocale="true">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="dbo_Date" msprop:FriendlyName="Date"
msprop

bSchemaName="dbo" msprop

bTableName="Date"
msprop:TableType="Table">
<xs:complexType>
<xs:sequence>
<xs:element name="DayKey" msprop:FriendlyName="DayKey"
msprop

bColumnName="DayKey" type="xs:int" />
<xs:element name="MonthKey" msprop:FriendlyName="MonthKey"
msprop

bColumnName="MonthKey" type="xs:int" />
<xs:element name="YearKey" msprop:FriendlyName="YearKey"
msprop

bColumnName="YearKey" type="xs:short" />
<xs:element name="Date_x0020_Date_x0020_Calculations"
msprop:ComputedColumnExpression="N'Current Date'" msprop

escription="This
column was created by the Business Intelligence Wizard. An attribute in the
Time dimension has been created that is based on this column. If deleted,
the time intelligence calculations that have been defined in the calculation
script will no longer be valid." msprop:IsLogical="True" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="15" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="dbo_Fact" msprop:FriendlyName="Fact"
msprop

bSchemaName="dbo" msprop

bTableName="Fact"
msprop:TableType="Table">
<xs:complexType>
<xs:sequence>
<xs:element name="DayKey" msprop:FriendlyName="DayKey"
msprop

bColumnName="DayKey" type="xs:int" />
<xs:element name="amount" msprop:FriendlyName="amount"
msprop

bColumnName="amount" type="xs:int" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
<xs:unique name="Constraint1" msdata:PrimaryKey="true">
<xs:selector xpath=".//dbo_Date" />
<xs:field xpath="DayKey" />
</xs:unique>
<xs:keyref name="FK_Fact_Date" refer="Constraint1">
<xs:selector xpath=".//dbo_Fact" />
<xs:field xpath="DayKey" />
</xs:keyref>
</xs:element>
</xs:schema>
<diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1" />
</Schema>
</DataSourceView>
</DataSourceViews>
</Database>
</ObjectDefinition>
</Create>