I am very new to SSAS and its corresponding language MDX. So this is probably a newbie question.
I have a cube with a fact table, games, and 2 dimensions attached, players and events, repectively. Each dimension has a date.
What I want to do is create a calculated member to count the number of new players for each event, and exclude the ones that already played in previous events.
A logic representation of the code would be this:
DistinctCount(
IIF(
[Customer].[Date registered as player] > [Sponsored events].[Start date]
,1
,0
)
)
But this does not work in MDX.
Really tricky to help without more information about the structure of your cube - maybe you could add a screenprint showing us the dimensions and hierarchies.
You could use an approach something like this:
SUM(
[Customer].[Customer].[Customer].members
,IIF(
[Customer].[Date registered as player].currentmember.membervalue
> [Sponsored events].[Start date].currentmember.membervalue
,1
,NULL
)
)
The above is really just pseudo-code without more information about your cube structure.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.