Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


MDX ParallelPeriod in Calculated Member


MDX ParallelPeriod in Calculated Member

Author
Message
mickielsmith
mickielsmith
SSC Rookie
SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)

Group: General Forum Members
Points: 25 Visits: 96
Hi SQL Server Central Forumers,

I'm trying to calculate the Prior Year Amount in a calculated member with the following expression. The cube processes without errors but, the result in PYAmount column when i browse the cube is null value for all rows.

-- PYAmount Calculated member
(
[Measures].[PYAmount],
ParallelPeriod([Date Pay And Benefits].[Fiscal Year].[Fiscal Year]
, 1
, [Date Pay And Benefits].[Fiscal Year].CurrentMember)
)'


But the same expression works fine when I used it to write query on the cube to get previous year sales count. Following is the query for that. I don't understand why the same WITH MEMBER expression used in Calculated Member is not working.

With Member [PYAmount] As
'(
[Measures].[Amount]
, ParallelPeriod([Date Pay And Benefits].[Fiscal Year].[Fiscal Year]
, 1
, [Date Pay And Benefits].[Fiscal Year].CurrentMember)
)'
Select
{[Date Pay And Benefits].[Fiscal Year].[Fiscal Year].[2008]
, [Date Pay And Benefits].[Fiscal Year].[Fiscal Year].[2004].Children} on columns
, {[Measures].[Amount], [Measures].[PY Amount]} on rows
From MyCube

Please correct me if i'm doing anything wrong and please some workable solutions. .
Devin Knight
Devin Knight
Grasshopper
Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)

Group: General Forum Members
Points: 17 Visits: 223
Try rewriting like this.

(ParallelPeriod([Date Pay And Benefits].[Fiscal Year].[Fiscal Year]
, 1
,[Date Pay And Benefits].[Fiscal Year].CurrentMember)
,[Measures].[Amount])
mickielsmith
mickielsmith
SSC Rookie
SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)

Group: General Forum Members
Points: 25 Visits: 96
Thanks rewriting the MDX code worked in calculated measure.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search