논리 함수 사용

논리 함수는 개체와 식에 대해 논리 연산이나 비교를 수행하고 부울 값을 반환합니다. MDX(Multidimensional Expressions)에서 멤버의 위치를 결정하는 데는 논리 함수가 필수적입니다.

가장 일반적으로 사용되는 논리 함수는 IsEmpty 함수입니다. IsEmpty 함수를 사용하는 방법은 빈 값 작업을 참조하십시오.

다음 쿼리에서는 IsLeaf 및 IsAncestor 함수를 사용하는 방법을 보여 줍니다.

WITH

//Returns true if the CurrentMember on Calendar is a leaf member, ie it has no children

MEMBER MEASURES.[IsLeafDemo] AS IsLeaf([Date].[Calendar].CurrentMember)

//Returns true if the CurrentMember on Calendar is an Ancestor of July 1st 2001

MEMBER MEASURES.[IsAncestorDemo] AS IsAncestor([Date].[Calendar].CurrentMember, [Date].[Calendar].[Date].&[1])

SELECT{MEASURES.[IsLeafDemo],MEASURES.[IsAncestorDemo] } ON 0,

[Date].[Calendar].MEMBERS ON 1

FROM [Adventure Works]

참고 항목

개념

함수(MDX 구문)