Membro successivo
In base all'ordine dei membri esistenti in un profilo di Essbase, la funzione MDX NextMember() restituisce il membro successivo nella stessa generazione o allo stesso livello.
Sintassi
member.NextMember [( layertype ) ]oppure
NextMember ( member [,layertype ] )Parametri
Note
-
Se il membro successivo non viene trovato, questa funzione restituisce un membro vuoto. Ad esempio, se si utilizza Sample Basic, viene restituito un membro vuoto:
Qtr4.nextmembereYear.nextmember. -
Se sono abilitate più gerarchie, questa funzione restituisce NULL se il membro di origine si trova in una gerarchia e il membro risultato appartiene a una gerarchia diversa.
Esempio 1
La seguente espressione MDX restituisce [Jul], che è un passo avanti rispetto a Jun:
[Jun].nextmemberEsempio 2
La seguente query MDX:
/*
For January, PrevMember doesn't exist
For December, NextMember doesn't exist
*/
WITH
MEMBER
[Measures].[Delta from Previous Month]
AS
' [Measures].[Sales] -
([Measures].[Sales],[Year].CurrentMember.PrevMember)
'
MEMBER [Measures].[Delta from Next Month]
AS
' [Measures].[Sales] -
([Measures].[Sales], [Year].CurrentMember.NextMember)
'
SELECT
{ [Measures].[Sales],
[Measures].[Delta from Previous Month],
[Measures].[Delta from Next Month]
}
ON COLUMNS,
[Year].Levels(0).Members
ON ROWS
FROM Sample.Basic
WHERE
(
[Scenario].[Actual],
[Market].[East],
[Product].[100]
)restituisce l'output seguente:
Tabella 4-116 Griglia di output da MDX Esempio
| (axis) | Vendite | Delta da mese precedente | Delta da mese successivo |
|---|---|---|---|
| Gen | 2.105 | 2.105 | 44 |
| Feb | 2.061 | -44 | -65 |
| Mar | 2.126 | 65 | -132 |
| Apr. | 2.258 | 132 | -89 |
| Maggio | 2.347 | 89 | -278 |
| giu | 2.625 | 278 | -110 |
| lug | 2.735 | 110 | 62 |
| Ago | 2.673 | -62 | 311 |
| Set | 2.362 | -311 | 268 |
| Ott | 2.094 | -268 | 28 |
| Nov. | 2.066 | -28 | -222 |
| Decimale | 2.288 | 222 | 2.288 |