Skip to content

Latest commit

 

History

History
57 lines (47 loc) · 1.45 KB

this-mdx.md

File metadata and controls

57 lines (47 loc) · 1.45 KB
title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic ms.custom
This (MDX)
This (MDX)
kfollis
kfollis
kfollis
02/17/2022
sql
analysis-services
reference
mdx

This (MDX)

Returns the current subcube for use with assignments in the Multidimensional Expressions (MDX) calculation script.

Syntax

  
This   

Remarks

The This function can be used in the place of any subcube expression to provide the current subcube within the current scope within the MDX calculation script. The This function must be used on the left side of an assignment.

Examples

The following MDX Script fragment shows how the This keyword can be used with SCOPE statements to make assignments to subcubes:

Scope  
(  
[Date].[Fiscal Year].&[2005],  
[Date].[Fiscal].[Fiscal Quarter].Members,  
[Measures].[Sales Amount Quota]  
) ;  
This = ParallelPeriod  
(  
[Date].[Fiscal].[Fiscal Year], 1,  
[Date].[Fiscal].CurrentMember  
) * 1.35 ;  
/*-- Allocate equally to months in FY 2002 -----------------------------*/  
Scope  
(  
[Date].[Fiscal Year].&[2002],  
[Date].[Fiscal].[Month].Members  
) ;  
This = [Date].[Fiscal].CurrentMember.Parent / 3 ;  
End Scope ;  
End Scope;  

See Also

MDX Function Reference (MDX)
Calculations