mdx-query

SSAS MDX Previous Year - Ignore Filter

倖福魔咒の 提交于 2021-01-28 20:19:20
问题 i try to get actual turnover and the turnover of the previous year in the same period. I write this query: with member [Measures].[Turnover PrevYear] as IIF( IsEmpty([Measures].[Turnover Actual] ), NULL, SUM( (ParallelPeriod( [Date].[Year - Quarter - Month - Date].[Year],1,[Date].[Year - Quarter - Month - Date].CurrentMember)) , [Measures].[Turnover Actual] ) ) Select non empty{[Measures].[Turnover Actual],[Measures].[Turnover PrevYear]} on Columns, non empty{[Store].[Store].[Store].members}

Counting the number of facts in a cell in MDX

依然范特西╮ 提交于 2020-03-25 18:39:54
问题 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

Counting the number of facts in a cell in MDX

怎甘沉沦 提交于 2020-03-25 18:39:11
问题 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

MDX query to count number of product names

…衆ロ難τιáo~ 提交于 2019-12-25 03:44:42
问题 I am new to MDX and trying to count number of product names on a week basis. I have written the below MDX query, but I get all product count as a result. WITH MEMBER [Measures].[Count Of Members] AS Count(Existing [Product Dimension].[ProductName].Members) SELECT {[Measures].[Count Of Members]} ON 0, NON EMPTY { [Date Dimension].[Financial WC] } ON 1 FROM [Cube] WHERE ([Date Dimension].[FinancialYear].&[2018/19], [Sales].[PaymentType].&[Delivery]) I am getting result as : "All 230" as there