Posted: 4/10/2012
Hi,
I need to calculate rolling 4 months forecast accuracy. We have 2 date dimensions named DATE and PERIOD.In order to implement the measure, I started with the following.
WITH
MEMBER TodayDate AS [Measures].[Value]
SET CurrentDate AS Filter([Dates].[Time Hierarchy].[Month], [Dates].[Time Hierarchy].currentmember.MemberValue = [Period].[Time Hierarchy].currentmember.nextmember.membervalue)
select {CurrentDate} on ROWS,
{TodayDate} on COLUMNS
from [CURRENT_DATA] WHERE [Period].[Month].&[2012-02-01T00:00:00]
In the actual cube, when a user selects a month from period dimension table, it has to display a value (demand quantity) for the combination "selected period month and next month in DATES dimension table". For ex. if a user selects Feb-12, then the demand quantity of period month Feb-12 and DATES table month of Mar-12 should be displayed. The above query works in SSMS but fails when run as a calculated measuer in the cube with the error showing 'Function expecting an argument of string or numeric type, but a tuple set is used'. I am aware that the second argument in FILTER function needs to be logical expression, but because we are using membervalue, the resulting expression should evaluate to true or false right? But why cube always shows this error? Same query when run in SSMS will is displaying Mar-12 and the corresponding measure value. Here the main challenge is to look for a next month in another dimension other than the one that user selects. Please suggest the approach to solve this problem.
Thank you..
Posted: 4/11/2012
Hello..
I got the solution. I used Linked Members and it worked..
Thanks..