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

MDX TopCount with non filtered totals

$
0
0

Given the MDX sample below from AdventureWorks that lists internet sales for the top 5 customers in FY 2004 for the United States, is there a way to also include the totals outside the United States? I found a similar post here that comes close but doesn't seem the same.

SELECT 
	NON EMPTY { [Measures].[Internet Sales Amount] } ON COLUMNS
	, NON EMPTY { (
	 TopCount( 
		[Customer].[Customer].CHILDREN
		, 5
		, ( [Date].[Fiscal Year].&[2004]  , [Measures].[Internet Sales Amount])
		)
	) } ON ROWS
 FROM ( SELECT ( { [Date].[Fiscal Year].&[2004] } ) ON COLUMNS 
 FROM ( SELECT ( { [Customer].[Customer Geography].[Country].&[United States] } ) ON COLUMNS 
 FROM [Adventure Works])) 
  WHERE ( 
	[Customer].[Customer Geography].[Country].&[United States] ,
	[Date].[Fiscal Year].&[2004]
	) 


Viewing all articles
Browse latest Browse all 14337

Trending Articles



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