Posted: 1/17/2012
Hello,
Listed is the MDX statement I am using in one of my reports. When I execute this in management studio, I am getting the values for column1 however, when I execute the same mdx in ssrs, column 1 is empty. Listing 1 is the mdx query and listing 2 is the profiler trace of this query.
Listing 1:
SELECT
{ [Measures].[Sales Units] ,[Measures].[Sales Coupons] ,[Measures].[Cost Of Sales] ,[Measures].[% Parent Inventory (Value)] ,[Measures].[Inventory Value] ,[Measures].[Turn] ,[Measures].[GM Ratio] ,[Measures].[Average Unit Cost] } ON COLUMNS,
{
[Measures].[Sales Units]
,[Measures].[Sales Coupons]
,[Measures].[Cost Of Sales]
,[Measures].[% Parent Inventory (Value)]
,[Measures].[Inventory Value]
,[Measures].[Turn]
,[Measures].[GM Ratio]
,[Measures].[Average Unit Cost]
}
{ StrToSet("[Item].[Number Of Users].[Number Of Users]") *[Item].[Division].[Division] *[Item].[Department].[Department] *[Item].[Category].[Category] } ON ROWS From
*[Item].[Division].[Division]
*[Item].[Department].[Department]
*[Item].[Category].[Category]
( Select StrToSet("[Item].[Division].[All]") on Columns From
(
( Select StrToSet("[Item].[Department].&[PERSONAL ITEMS]") on Columns From ( Select StrToSet("[Item].[Category].[All]") on Columns From RFP))) Where
Where
({StrToSet
{(
StrToMember("[Time].[Date].&[2011-09-15]",CONSTRAINED):StrToMember("[Time].[Date].&[2011-09-19]",CONSTRAINED))})
Listing 2:
{ [Measures].[Sales Units] ,[Measures].[Sales Coupons] ,[Measures].[Cost Of Sales] --,[Measures].[Average Inventory Value]
From
( Select StrToSet(@pDivision) on Columns From
({StrToSet(@pLocation)}, {( StrToMember(@pStartDate,CONSTRAINED):StrToMember(@pEndDate,CONSTRAINED))})
<Parameters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:schemas-microsoft-com:xml-analysis">
<Parameter>
<
</Parameter>
</Parameters>
<PropertyList xmlns="urn:schemas-microsoft-com:xml-analysis">
<LocaleIdentifier>1033</LocaleIdentifier>
<Format>Tabular</Format>
<Timeout>0</Timeout>
<ReturnCellProperties>
<DbpropMsmdFlattened2>
</PropertyList>