Hi this is code working fine and return top 2 product in a state. i need to add other sales also how can we do
with set FIPS as [Geography].[State-Province].[State-Province]
set TCat as
Generate( {FIPS}, CrossJoin( {[Geography].[State-Province].CurrentMember},
TOPCount(
([Product].[Subcategory].[Subcategory]),
2,
[Measures].[Sales Amount]
) ))
SELECT { [Measures].[Sales Amount] } ON COLUMNS,
TCat ON ROWS
FROM [Adventure Works]
hi fond one code it is work for one dimension only, i need for two dimension
WITH
SET [TCat] AS
TopCount([Product].[Subcategory].[Subcategory],10,[Measures].[Sales Amount])
MEMBER [Product].[Subcategory].[Other] AS
Aggregate([Product].[Subcategory].[Subcategory] - TCat)
SELECT { [Measures].[Sales Amount] } ON COLUMNS,
TCat + [Other] ON ROWS
FROM [Adventure Works]
;