私はクエリを持っていますが、where句とサブクラスでパラメトリックに日付になりたいです。 どうすればいいですか? 私はwith句で定義したとき、私はwhere句とサブクエリでそれを使うことができません。MDX where句とサブクエリに日付パラメータを渡すにはどうすればいいですか
私のメインのクエリは次のとおりです。
WITH
SET [countOfProple] As
filter ([VW Dim Customer Broker Branch].[Customer BK].[Customer BK],[Measures].[Trade Cnt]>0)
member [measures].[numbers] AS
count([countOfProple])
select
[measures].[numbers] on 0
from (
select
{[VW Dim Customer Broker Branch].[Customer BK].[Customer BK]*[VW Dim Customer Broker Branch].[Reception Date].&[2006-09-23T00:00:00]:[VW Dim Customer Broker Branch].[Reception Date].&[2009-08-30T00:00:00]} on 0
from [DV Present]
)
where [Vw Dim Date].[Gregorian Date].&[2006-09-23T00:00:00]:[Vw Dim Date].[Gregorian Date].&[2009-08-30T00:00:00];
私は以下のからそれを変更した場合、それはエラーがあります:
WITH
SET [countOfProple] As
filter ([VW Dim Customer Broker Branch].[Customer BK].[Customer BK],[Measures].[Trade Cnt]>0)
SET Date1 AS
[VW Dim Customer Broker Branch].[Reception Date].&[2006-09-23T00:00:00]:[VW Dim Customer Broker Branch].[Reception Date].&[2009-08-16T00:00:00]
SET Date2 AS
[Vw Dim Date].[Gregorian Date].&[2006-09-23T00:00:00]:[Vw Dim Date].[Gregorian Date].&[2009-08-16T00:00:00];
member [measures].[numbers] AS
count([countOfProple])
select
[measures].[numbers] on 0
from (
select
{[VW Dim Customer Broker Branch].[Customer BK].[Customer BK]*Date1} on 0
from [DV Present]
)
where Date2