MDX - Change in quarters caption

Hi 

I've got the following query against the AdventureWorks 2008R2 cube which returns the [Reseller Order Quantity] for four quarters and three values which represent the difference in [Reseller Order Quantity] between the quarters.

with member [Change Since Previous Quarter] as

([Date].[Calendar].currentmember,[Measures].[Reseller Order Quantity]) 
	- (ParallelPeriod([Date].[Calendar].[Calendar Quarter], 1, [Date].[Calendar].currentmember),[Measures].[Reseller Order Quantity])

select 
{([Measures].[Reseller Order Quantity], LastPeriods(4,[Date].[Calendar].[Calendar Quarter].&[2003]&[3]))
	,([Change Since Previous Quarter], LastPeriods(3,[Date].[Calendar].[Calendar Quarter].&[2003]&[3]))} on 0

from [Adventure Works]

Which returns the following

Reseller Order Quantity Reseller Order Quantity Reseller Order Quantity Reseller Order Quantity Change Since Previous Quarter Change Since Previous Quarter Change Since Previous Quarter
Q4 CY 2002 Q1 CY 2003 Q2 CY 2003 Q3 CY 2003 Q1 CY 2003 Q2 CY 2003 Q3 CY 2003
19,772 12,307 19,466 39,784 -7465 7159 20318

What I would like is to be able to change the date representation under the [Change Since Previous Quarter] from the format of [Q1 CY 2003] to [Quarter1 2003] so the output looks like this

Reseller Order Quantity Reseller Order Quantity Reseller Order Quantity Reseller Order Quantity Change Since Previous Quarter Change Since Previous Quarter Change Since Previous Quarter
Q4 CY 2002 Q1 CY 2003 Q2 CY 2003 Q3 CY 2003 Quarter1 2003 Quarter2 2003 Quarter3 2003
19,772 12,307 19,466 39,784 -7465 7159 20318

I've added a member to represent the new quarter formats ([Quarter Description]) but I don't know how to write the MDX query needed to get the above result. What MDX query do I need to get the above result?

Any help would be much appreciated.

May 28th, 2014 1:27am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics