Results of MDX query against missing partition - Tabular 2012

136 views Asked by At

UPDATE: the resolution was to do a process full at the database level instead of at the partition level.

I am trying to understand the behavior I am observing with a query a Tabular model. I partition by quarter, so when I built a new "current quarter" partition at the start of this quarter, the partition that used to contain 2016-Q4 was overwritten with 2017-Q1. Then when I ran my MDX query against the Tabular model filtering on the date dimension for 2016-Q4, instead of returning nothing like I would have expected, it returned data from the oldest partition 2014-Q1. It is like instead of returning no data, it decides to return the "first record" for that dimension (in this case all dates where 07/01/2014). Every other dimension I was filtering on still performed as expected.

Does anybody have any ideas as to why it behaves this way? FYI, I have tried restructuring my MDX statement a couple different ways:

SELECT 
NON EMPTY { [Measures].[Measure1]} ON COLUMNS, 
NON EMPTY { ([Dimension].[Dimension1])} DIMENSION PROPERTIES member_caption, member_unique_name ON ROWS 
FROM [Model] WHERE ([Dimension].[Dimension2].&[Value], [DateDimension].[DateDimension].&[Value1] : [DateDimension].[DateDimension].&[Value2])

AND

SELECT 
NON EMPTY { [Measures].[Measure1]} ON COLUMNS, 
NON EMPTY { ( except([Dimension].[Dimension1].members,[Dimension].[Dimension1].[all]))} DIMENSION PROPERTIES member_caption, member_unique_name ON ROWS 
FROM ( SELECT ( [Dimension].[Dimension1].&[Value] ) ON COLUMNS 
FROM ( SELECT ( [Dimension].[Dimension2].&[Value] ) ON COLUMNS 
FROM ( SELECT ( [DateDimension].[DateDimension].&[Value1] : [DateDimension].[DateDimension].&[Value2] ) ON COLUMNS 
FROM [Model])))

Edit: added example of actual MDX

SELECT 
NON EMPTY { [Measures].[ConvertedNetRevenue], 
[Measures].[LoadConvertedNetRevenue], 
[Measures].[OrderConvertedNetRevenue], 
[Measures].[TotalOrderBrokerageCount], 
[Measures].[TotalLoadBrokerageCount]   
} ON COLUMNS, 
NON EMPTY { 
( 
except([BrokerageQuery].[KeyBranch].members,[BrokerageQuery].[KeyBranch].[all]),
except([BrokerageQuery].[LoadNumber].members,[BrokerageQuery].[LoadNumber].[all]),
except([BrokerageQuery].[CustomerOrderNumber].members,[BrokerageQuery].[CustomerOrderNumber].[all]),
except([BrokerageQuery].[BranchName].members,[BrokerageQuery].[BranchName].[all]),
except([BrokerageQuery].[BranchCode].members,[BrokerageQuery].[BranchCode].[all]),
except([BrokerageQuery].[BranchRoleDescription].members,[BrokerageQuery].[BranchRoleDescription].[all]),
except([BrokerageQuery].[ModeDescription].members,[BrokerageQuery].[ModeDescription].[all]),
except([BrokerageQuery].[ServiceTypeDescription].members,[BrokerageQuery].[ServiceTypeDescription].[all]),
except([BrokerageQuery].[SystemDisplayName].members,[BrokerageQuery].[SystemDisplayName].[all]),
except([BrokerageQuery].[IsPartialFinLock].members,[BrokerageQuery].[IsPartialFinLock].[all]),
except([BrokerageQuery].[KeyDate_Financial].members,[BrokerageQuery].[KeyDate_Financial].[all])
) 
} DIMENSION PROPERTIES member_caption, member_unique_name ON ROWS 
FROM ( SELECT 
( 
{ 
[dimCurrency].[CurrencyCode].&[USD] 
} 
) ON COLUMNS 
FROM ( SELECT 
( 
{ 
{ 
[BrokerageQuery].[KeyBranch].[10279]
} 
} 
) ON COLUMNS 
FROM ( SELECT 
( 
[BrokerageQuery].[KeyDate_Financial].&[20161106] : 
[BrokerageQuery].[KeyDate_Financial].&[20161106] 
) ON COLUMNS 
FROM [Brokerage])))
1

There are 1 answers

0
ECHR On

Instead of processing our partitions individually (at the beginning of each quarter when re-partitioning occurs), we need to do a database-level process full.