I have a named set like this :
(
[DimDate].[Hierarchy].currentmember.lag(1)
,
[Measures].[Fact Transaction Count]
)
This code give me count of transaction of yesterday current member. now I want to use it to calculate daily growth. some thing like this :
(
([Measures].[Fact Transaction Count] - GetPreviousTransactionValueDate.Item(0).Item(0)) / GetPreviousTransactionValueDate.Item(0).Item(0)
) * 100
when use it in SSMS I can get output but when I send it to SSDT I get a Null value for all hierarchy.
this code give me output :
with member measures.GetPreviousTransactionValueDate as
(
[DimDate].[Hierarchy].currentmember.lag(1)
,
[Measures].[Fact Transaction Count]
)
member measures.Roshd as
(
([Measures].[Fact Transaction Count] - measures.GetPreviousTransactionValueDate) / measures.GetPreviousTransactionValueDate) * 100
)
select non empty( measures.Roshd) on columns,
non empty([DimDate].[Hierarchy].[Month]) on rows
from [Cube]
I want to only use named Set not another calculated member for this topic. any help?
Finally I found that my way is wrong. because sets works on dimensions not use for creating a calculated member.