I keep getting an error "The ParallelPeriod function expects a member expression for the argument. A tuple set expression was used." Is there something that I can use instead of LastPeriods to get this to work?
Here is the trend expression for a KPI that I get the error for:
(KPIVALUE('ABI Aggregate Test')-(CoalesceEmpty(
Aggregate({[Entities].[SITE].&[1]}
* {[Entities].[EntityType].[Site]}
* {[TDVs].[Parameter - Material].&[Bitum_Coal_Usage_Site -]}
* {ParallelPeriod([Date].[Year - Quarter - Month - Date].[Date], 1,
LastPeriods(3, StrToMember('[TDV Result Date].[Year - Quarter - Month - Date].[Year].[Calendar ' + EssMdx.Ess.Epm.AnalysisServices.MdxFunctions.Timeframe.GetLastFullYear() + ']')))}
, [Measures].[Result]),0)))
Could you describe what you are trying to do? It looks like you are trying to go back 1 day from a set consisting of the last 3 years. If you are trying to compare the KPI value to the same day 3 years ago you could use the Lag() function instead of LastPeriods(), but I don't really think that is what you are trying to do.|||Sorry, the above line {ParallelPeriod([Date].[Year - Quarter - Month - Date].[Date], 1, should be {ParallelPeriod([Date].[Year - Quarter - Month - Date].[Year], 1,
I am trying to get a trend expression based on 1 year back (or 2 or 3...). ParallelPeriod has been working fine except with date ranges. The KPI value expression will give me a value for the last 3 full years (2006, 2005, and 2004) and is the same expression without the ParallelPeriod function. If the trend is 1 year back then it should be 2005, 2004, and 2003 (or it may be 2003, 2002, 2001).
Thanks
|||
That makes a bit more sense. In this case you simply have the LastPeriods and ParallelPeriod function nested the wrong way around, changing it to the following should work. Basically you need to pass the result of your GetLastFullYear Function to ParallelPeriod() and then pass the member from that to LastPeriods.
eg
(KPIVALUE('ABI Aggregate Test')-(CoalesceEmpty(
Aggregate({[Entities].[SITE].&[1]}
* {[Entities].[EntityType].[Site]}
* {[TDVs].[Parameter - Material].&[Bitum_Coal_Usage_Site -]}
* {LastPeriods(3,
ParallelPeriod([Date].[Year - Quarter - Month - Date].[Date], 1,StrToMember('[TDV Result Date].[Year - Quarter - Month - Date].[Year].[Calendar ' + EssMdx.Ess.Epm.AnalysisServices.MdxFunctions.Timeframe.GetLastFullYear() + ']')))}, [Measures].[Result]),0)))
|||Thanks.
No comments:
Post a Comment