MDX日期过滤器无法正常工作

时间:2017-10-31 14:54:48

标签: date ssas mdx

我正面临着这种奇怪的行为,因为下面的MDX ...当服务日期小于​​20170630时,我获得所有可用服务日期的数据,直到20171030,但是当我减少日期范围时,即使这些记录早些时候显示,我也什么也得不到范围更广。任何人都可以帮助解决这种行为的原因。

WITH 
MEMBER [Measures].[date_dateid__servicedate] as [Service Date].[Date ID].currentMember.name

MEMBER [Measures].[vendor_vendorname] as [Vendor].[Vendor Name].currentMember.name

MEMBER [Measures].[corporation_corpcode] as [Corporation].[Corp Code].currentMember.name

MEMBER [Measures].[billingcategory_billcategory] as [BillingCategory].[Bill Category].currentMember.name

MEMBER [Measures].[afe_afenumber] as [Afe].[Afe Number].currentMember.name

MEMBER [Measures].[afeproperty_wellname] as [Afe Property].[Well Name].currentMember.name

MEMBER [Measures].[dailygrossexpenses_grossactual] as [Measures].[Gross Actual]

MEMBER [Measures].[dailygrossexpenses_grossexpenseandotherincome_expenseamount] as [Measures].[Gross Expense and Other Income - Expense Amount]

 SELECT 
 { [Measures].[date_dateid__servicedate],
   [Measures].[vendor_vendorname],
   [Measures].[corporation_corpcode],
   [Measures].[billingcategory_billcategory],
   [Measures].[afe_afenumber],
   [Measures].[afeproperty_wellname],
   [Measures].[dailygrossexpenses_grossactual],
   [Measures].[dailygrossexpenses_grossexpenseandotherincome_expenseamount] 
  } ON columns , 
SUBSET(ORDER(NONEMPTY({ [Vendor].[Vendor Name].Children
       *[Service Date].[Date ID].Children
       *[Corporation].[Corp Code].Children
       *[BillingCategory].[Bill Category].Children
       *[Afe].[Afe Number].Children
       *[Afe Property].[Well Name].Children }, 
{[Measures].[Gross Actual],
 [Measures].[Gross Expense and Other Income - Expense Amount]}), 
 [Measures].[vendor_vendorname],                   
BASC), 0 ,50 )ON rows 
FROM (SELECT { [Vendor].[Vendor Name].&[160] } on columns 
  FROM ( SELECT [Service Date].[Date ID].&[20170831]:[Service Date].[Date ID].&[20170930] on columns 
    FROM [XXXX] ))

0 个答案:

没有答案