目前 (MDX)

在反復專案期間,從集合傳回目前的 Tuple。

語法

  
Set_Expression.Current   

引數

Set_Expression
傳回集合的有效多維度運算式 (MDX) 運算式。

備註

在反復專案期間的每個步驟中,所操作的 Tuple 是目前的 Tuple。 Current 式會傳回該 Tuple。 此函式只有在一組反復專案期間才有效。

逐一查看集合的 MDX 函式包括 Generate 函式。

注意

此函式只適用于使用集合別名或定義具名集的集合。

範例

下列範例示範如何在 Generate 中使用 Current 函式:

WITH

//Creates a set of tuples consisting of all Calendar Years crossjoined with

//all Product Categories

SET MyTuples AS CROSSJOIN(

[Date].[Calendar Year].[Calendar Year].MEMBERS,

[Product].[Category].[Category].MEMBERS)

//Iterates through each tuple in the set and returns the name of the Calendar

//Year in each tuple

MEMBER MEASURES.CURRENTDEMO AS

GENERATE(MyTuples, MyTuples.CURRENT.ITEM(0).NAME, ", ")

SELECT MEASURES.CURRENTDEMO ON 0

FROM [Adventure Works]

另請參閱

MDX 函數參考 (MDX)