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

Calulated member by case instruction infinite recursion

$
0
0

Hello.

I think that it's quiet simple but i don't understand the source of error.

I try to calculate Internet Total Product Cost from AdventureWorks and for US i using calculated member as source.

After quary completes i recieve error massage about infinite recursion.

with

member [Customer].[Customer Geography].[United States calc] as 
	([Customer].[Customer Geography].[Country].&[United Kingdom], [Measures].[Internet Total Product Cost])

member [Measures].[Internet Total Product Cost calc] as 
	case 
		when [Customer].[Customer Geography].CurrentMember = [Customer].[Customer Geography].[Country].&[Australia]
			then 1
		when [Customer].[Customer Geography].CurrentMember = [Customer].[Customer Geography].[Country].&[Canada]
			then 3
		when [Customer].[Customer Geography].CurrentMember = [Customer].[Customer Geography].[Country].&[France]
			then 5
		when [Customer].[Customer Geography].CurrentMember = [Customer].[Customer Geography].[Country].&[Germany]
			then 6
		when [Customer].[Customer Geography].CurrentMember = [Customer].[Customer Geography].[Country].&[United Kingdom]
			then 7
		when [Customer].[Customer Geography].CurrentMember = [Customer].[Customer Geography].[Country].&[United States]
			then ([Customer].[Customer Geography].[United States calc])
	end

select 

{[Measures].[Internet Total Product Cost],
[Measures].[Internet Total Product Cost calc]} on 0
,
[Customer].[Customer Geography].[All Customers].children on 1
from [Adventure Works]

Where is problem?




Viewing all articles
Browse latest Browse all 2472

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>