Quantcast
Channel: SQL Server Analysis Services forum
Viewing all articles
Browse latest Browse all 14337

Adventureworks as Example - Need for a flag to see whether a product model was sold in australia as a property on the product dimension

$
0
0

In relation to another project, have tried to port the problem to adventure works.

I need to pickup and present as an object on the Product Model, whether a given product model was sold in australia.

My 5 cents so far (Sorry for lack of mdx skills):

WITH member [Measures].ModelSoldInAustralia AS 
--IIF( [Customer].[Customer Geography].CurrentMember IS [Customer].[Customer Geography].[Country-Region].&[Australia],1,0)
iif(
Exists([Customer].[Customer Geography].[Country-Region].&[Australia],
	[crossjoin(
				[Product].[Model Name].CurrentMember,
				[Customer].[Customer Geography].[Country-Region].ALLMEMBERS,
				[Measures].[Internet Sales-Sales Amount])
	),1,0)

SELECT 
    [Product].[Model Name].[Model Name].ALLMEMBERS,
[Measures].ModelSoldInAustralia
    ON ROWS


  --,test
 ,{[Measures].[Internet Sales-Sales Amount] } ON COLUMNS
FROM [Internet Sales];
Can somebody please explain what I need to do


Viewing all articles
Browse latest Browse all 14337

Trending Articles