Quantcast
Channel: SQL Server Analysis Services Forum
Viewing all articles
Browse latest Browse all 2472

MDX: compare some members of hierarhy with condition and change calculation

$
0
0

Hello.

I have following query on mdx:

With

member [measures].[my_value] as 
	iif([Customer].[Customer Geography].currentmember = [Customer].[Customer Geography].[Canada].Allmember,
	3,
	0)


select 
[measures].[my_value] on 0
,
{
descendants({[Customer].[Customer Geography].[Australia]}, [Customer].[Customer Geography].[City], self_and_before),
descendants({[Customer].[Customer Geography].[Canada]}, [Customer].[Customer Geography].[City], self_and_before)
} on 1
From [Adventure Works]

So, i want that my_value = 3 for all members that are situated in Canada.

How i can perform this?


Viewing all articles
Browse latest Browse all 2472

Trending Articles