|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Friday, February 26, 2010 7:02 AM
Points: 19,
Visits: 52
|
|
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. .
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Wednesday, March 17, 2010 7:41 PM
Points: 11,
Visits: 126
|
|
Try rewriting like this.
(ParallelPeriod([Date Pay And Benefits].[Fiscal Year].[Fiscal Year] , 1 ,[Date Pay And Benefits].[Fiscal Year].CurrentMember) ,[Measures].[Amount])
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Friday, February 26, 2010 7:02 AM
Points: 19,
Visits: 52
|
|
| Thanks rewriting the MDX code worked in calculated measure.
|
|
|
|