I have a cell calculation in a query which I use for SSRS query and contains parameter like;
MEMBER Measures.[SatisTotalYTD] AS null
CELL CALCULATION ScopeEmulator
FOR '(order(STRTOSET(@Ay1),[DimDateView].[YearMonthNumber].currentMember.name,BDESC).item(0),Measures.[SatisTotalYTD])'
AS [Measures].[KapananAyaKadarTotalYTD]
But when I execute the query it gives me error as
Parameter could not be resolved because it was referenced in an inner subexpression
So I tried to define parameter value as a set;
with
SET [Aylar1] as STRTOSET(@Ay1)
MEMBER Measures.[SatisTotalYTD] AS null
CELL CALCULATION ScopeEmulator
FOR '(order([Aylar1],[DimDateView].[YearMonthNumber].currentMember.name,BDESC).item(0),Measures.[SatisTotalYTD])'
AS [Measures].[KapananAyaKadarTotalYTD]
Then it gives me
The definition of the Aylar1 set contains a circular reference.
So how can I use parameter in a cell calculation expression?