2017-05-25 13 views
0

と、次のMDXクエリを動的にするために、私は(開始日よりも大きいと終了日未満で定義される)アクティブな機会のasofdateを計算し、次のMDXクエリを持ってSSAS MDX使用StrtomemberはCURRENTMEMBER

ときの日付これは動作します値はハードコードされています。しかし、私はそれが階層内のメンバーを取り、二つの日付つまり

with member 

[Measures].[Cumulative_count_dates] 
as 
AGGREGATE(
{NULL:[Time Dimension].[Year-Qtr-Month-Date].[Date].&[2011-10-09T00:00:00]} * {[Opportuntity Close Dt].[Year-Qtr-Month-Date].[Date].&[2011-10-11T00:00:00] : NULL} 

, [Measures].[Opportunities Count] 
) 

select {[Measures].[Cumulative_count_dates]} on columns, 
NON EMPTY {[Time Dimension].[Year-Qtr-Month-Date].members} on rows 
from AdventCube 

間のオープンな機会を計算.CURRENTMEMBERで仕事をしたい、私は変数

[Time Dimension].[Year-Qtr-Month-Date].[Date].&[2011-10-09T00:00:00] 

としてこれを渡したいです助けてください。

答えて

0

CurrentMemberに問題がありますか?

with member 

[Measures].[Cumulative_count_dates] 
as 
AGGREGATE(
{NULL:[Time Dimension].[Year-Qtr-Month-Date].CurrentMember} * {[Opportuntity Close Dt].[Year-Qtr-Month-Date].[Date].&[2011-10-11T00:00:00] : NULL} 

, [Measures].[Opportunities Count] 
) 

select {[Measures].[Cumulative_count_dates]} on columns, 
NON EMPTY {[Time Dimension].[Year-Qtr-Month-Date].[Date].members} on rows 
from AdventCube 
+0

ありCURRENTMEMBERと間違って何もありませんが、私はそれを使用する場合、私は間違った結果を取得していますが...だから私は動的に可能日付ごとMDXクエリを構築するための実際の文字列を渡します考え出しました。 – jaya

+0

わかりません。間違った正しい結果を提供してください。 –

関連する問題