MDX Queries - Compare current Month Sale with Previous Month Sales

Problem: Compare current Month Sale with Previous Month Sales


MDX I used to solve the problem is as below:

// Retrieve Number of Prior Periods
WITH
MEMBER [Measures].[PreviousMonthSale] AS
([Date].[Calendar Date].PrevMember,
[Measures].[Reseller Sales-Sales Amount]), Format_String = 'Currency'

SELECT
{[Measures].[Reseller Sales-Sales Amount],[Measures].[PreviousMonthSale] }  ON COLUMNS,
NON EMPTY [Date].[Calendar Date].[Month Name] ON ROWS
FROM [Analysis Services Tutorial]


Comments

Popular posts from this blog

Calculating Age of the person in T-SQL

How to Troubleshoot Subscription issue in Reporting Services

MDX Queries - Current Day - Month and Year