Counting the number of facts in a cell in MDX
问题 Here is a simple schema with two dimensions and a fact with a measure. CREATE TABLE DimThingType ( ThingTypeID int NOT NULL PRIMARY KEY, ThingTypeDescription varchar(8) NOT NULL ) CREATE TABLE DimThing ( ThingID int NOT NULL PRIMARY KEY, ThingName varchar(8) NOT NULL ) CREATE FactFacts ( FactID int NOT NULL PRIMARY KEY, ThingID int NOT NULL, ThingTypeID int NOT NULL, Turnips int NOT NULL ) Now in MDX we can sum the number of turnips for each thing type . SELECT NON EMPTY { [Measures].[Trunips