Time intelligence - still failing at the lowest level

6 views
Skip to first unread message

Vimas

unread,
Nov 27, 2006, 2:32:31 PM11/27/06
to
Hello,

I was wondering if there is an update to microsoft bug (or feature) that
time intelligence calculation does not work at the lowest level.
Today I re-read all articles related to this problem and I re-tested
functionality and was able easily to reproduce problem (SSAS 2005, SP1).

I read this article http://support.microsoft.com/Default.aspx?kbid=912136,
second part of this kind of implies that this should fix problem, but it
does not.

To test I did following:

Create Date dimension with levels Day, Month, Year. And created hierarchy
[Date].[Date] that consist of Year->Month->Day
I created simple cube and used just one single measure - count and one
dimension Date.
I run code to add time intelligence, and added YTD calculation and latter
remove that calculation and replaced it with simple calculation: I want
value at every cell to be 100. I know this is meaningless, but I want to
prove my point. I included my complete code below.
Now this code does not work at the Day level! I would have to say it works
when Date dimension is in filter area - you can select day level member, and
results are as expected. But as soon as you put day dimension in row are,
put [Date].[Date Date Calculation] in filter area, at the day level code
ALLWAYS returns NA.

I know that other people confirmed this behaviour, but I would like somebody
from Microsoft try to reproduce it and maybe suggest workaround.
Or there is allways a big chance that I am doing something wrong, could you
please point me what?

Thank you,

This is my complete code:
CALCULATE;

/*

Begin Time Intelligence script for the [Date].[Date] hierarchy.

*/

Create Member

CurrentCube.[Date].[Date Date Calculations].[End Of Period]

As "NA" ;


Scope(

{

[Measures].[Claim Count]

}

) ;

(

[Date].[Date Date Calculations].[End Of Period]

,[Date].[Date].Members

, [Date].[Day].Members

) = 100;

/*

End Time Intelligence script for the [Date].[Date] hierarchy.

*/

Peter Yang [MSFT]

unread,
Nov 28, 2006, 2:49:15 AM11/28/06
to
Hello Vimas,

I understand that you encountered issues for lowest level of time
dimension. I have forwarded this feedback to the product team to see if
there is any explaination for the behavior. If there is any update, I'll
let you know as soon as possible. Thank you for your patience.

Best Regards,

Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications
<http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx>.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
<http://msdn.microsoft.com/subscriptions/support/default.aspx>.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Peter Yang [MSFT]

unread,
Nov 29, 2006, 3:35:39 AM11/29/06
to
Hello vimas,

I tried to reproduce on my side to no available.

I added the following caluated member in sample AW standard edtion to test
and I was not able to reproduce the issue:

=======


Create Member CurrentCube.[Date].[Fiscal Date Calculations].[test2] AS "NA"
;

Scope(
{
[Measures].[Internet Sales Amount]
}
);

( [Date].[Fiscal Date Calculations].[test2],

[Date].[Fiscal Year].[Fiscal Year].Members,

[Date].[Date].Members
) =100
;
End Scope ;

=======

I added [Fiscal Date Calculations] to row, added [Date].[Fiscal] to column
and [Internet Sales Amount]
to Details. After exapanding the tree of [Date].[Fiscal] to date, 100 is
displayed to the lowest level.


If I did not add [Date].[Date].Members in above script, I will see NA for
all cells that is not on Year level.


Also I created a new project/database with a single time dimension and
simple measure, and I also was not able to reproduce the issue.

Create Member CurrentCube.[Due Date].[DateH Due Date Calculations].[test1]
AS "NA" ;

Scope(
{
[Measures].[Sales Amount]
}
);


( [Due Date].[DateH Due Date Calculations].[test1],
[Due Date].[DateH].Members,
[Due Date].[Date].Members
)=110

;
End Scope ;


=======

I'd like to confirm if you have SQL 2005 SP1 installed. Also, if you try
above method, did you see different behavior? If so, please let me know the
exact reproduce steps so that I could check on my side. I look forward to
your update. Thank you.
Best Regards,

Peter Yang
MCSE2000/2003, MCSA, MCDBA

Microsoft Online Partner Support


=====================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

======================================================


Vimas

unread,
Dec 1, 2006, 10:20:58 AM12/1/06
to
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:DiagramLayout</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:DiagramViewPortLeft</Name>

<Value>-1933</Value>

</Annotation>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:DiagramViewPortTop</Name>

<Value>-8956</Value>

</Annotation>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:DiagramBoundingLeft</Name>

<Value>20</Value>

</Annotation>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:DiagramBoundingTop</Name>

<Value>0</Value>

</Annotation>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:DiagramZoom</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:DiagramLayout</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:DiagramViewPortLeft</Name>

<Value>-6669</Value>

</Annotation>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:DiagramViewPortTop</Name>

<Value>-6817</Value>

</Annotation>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:DiagramBoundingLeft</Name>

<Value>20</Value>

</Annotation>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:DiagramBoundingTop</Name>

<Value>0</Value>

</Annotation>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:DiagramZoom</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:DbSchemaName="dbo" msprop:DbTableName="Date"
msprop:TableType="Table">

<xs:complexType>

<xs:sequence>

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

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

<xs:element name="YearKey" msprop:FriendlyName="YearKey"
msprop:DbColumnName="YearKey" type="xs:short" />

<xs:element name="Date_x0020_Date_x0020_Calculations"
msprop:ComputedColumnExpression="N'Current Date'" msprop:Description="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:DbSchemaName="dbo" msprop:DbTableName="Fact"
msprop:TableType="Table">

<xs:complexType>

<xs:sequence>

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

<xs:element name="amount" msprop:FriendlyName="amount"
msprop:DbColumnName="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>


yongli

unread,
Dec 2, 2006, 4:20:00 PM12/2/06
to
My issue is similar not but exactly the same. The calcualted member (like
growth, growth%) will disppear when working with some of the other
dimensions. I found out that because some of dimensions have either unknown
member or blank member. By filterring out those unknown or blank member, the
calculated member will display values again. Not sure this is the root
cause, but just very wierd behaviors

Peter Yang [MSFT]

unread,
Dec 4, 2006, 4:21:40 AM12/4/06
to
Hello Vimas,

Thank you for your reply. From the database you provided I was able to
reproduce the issue on my side. With the following MDX query I saw the same
result as you do:

SELECT {[Measures].[Amount]} ON 0
, {[Date].[Date].Members} ON 1
FROM [Time Test]
WHERE ([Date].[Date Date Calculations].[Allways100])

However, if I use the following to query the result, it gets the proper
result:


SELECT {([Date].[Date Date Calculations].[Allways100])}ON 0


, {[Date].[Date].Members} ON 1
FROM [Time Test]


I also tested on SP2 CTP version (3027) with the same result. It seems this
is a product limitation or issue when this calculated member is in where
clause. I will report this issue to the product team. In the meantime, and
I encourage you submit via the link below

http://lab.msdn.microsoft.com/productfeedback/default.aspx

If there is any update on the issue, we will let you know. Thanks.

Vimas

unread,
Dec 4, 2006, 9:02:44 AM12/4/06
to
Peter,

Thank you. This functionality is very important to us and right now I am
using workaround were I created extra level for day level. So in my
dimension I have DayKey level, then Day level, month level, etc. As problem
is jus on key level, I hide this level from end users.
I believe that this workaround can cause performance impact, so I was trying
to optimize it, but I'll have to wait for a fix from Microsoft.

Thanks again

Regards

"Peter Yang [MSFT]" <pet...@online.microsoft.com> wrote in message
news:YGkjdW4F...@TK2MSFTNGHUB02.phx.gbl...

Peter Yang [MSFT]

unread,
Dec 6, 2006, 3:00:03 AM12/6/06
to
Hello Vimas,

Thank you for feedback and sharing your workaround on this issue! This
issue/bug is filed in our internal database and product team will evaluate
the impact and they will consider a fix or workaround if necessary. If
there is any update, we will let you know. Thanks again for your input and
we appreciate your patience.

Reply all
Reply to author
Forward
0 new messages