Hello there,
I'm trying to make the below ParallelPeriod named set dynamic.
This works fine:
WITH DYNAMIC SET [Test] AS
StrToSet
(
"ParallelPeriod([Finance Date].[Year-Week].[Week],1,[Finance Date].[Year-Week].[2013 Week 45])"
)
SELECT {[Test]} ON COLUMNS
FROM [Cube];
This produce an error of:
WITH DYNAMIC SET [Test] AS
StrToSet
(
"ParallelPeriod([Finance Date].[Year-Week].[Week],1,[Finance Date].[Year-Week].&[" + Cstr(datepart("yyyy",now())) + " Week " + Cstr(datepart("ww",now())) + "])"
)
SELECT {[Test]} ON COLUMNS
FROM [Cube];
Executing the query ...
The '2013 Week 51' string cannot be converted to the date type.
Execution complete
Obviously I need to somehow convert the string '2013 Week 51' in to a member value that SSAS will accept. Does anyone have any suggestions ?