Friday, March 9, 2012

MDX Question - Counting members in a Dimension with a "dateCreated" attirbute

Hello,

I'm fairly new to MDX and would like to add a calculated member:

In a dimension called DimCustomers I have a field called dateJoined which specifies when. Customers have the ability to create comments.

I have created a Fact table called FactComments, which has a id, customerid, timeid

What I would like is create a calculated member which uses the dateJoined field as a way to accumulate how many members had joined at given time.

e.g.

2005 - commentCount - memeberCountat2005 - comments/member-ratio
2006 - commentCount - memberCountin2006 - comments/member-ratio

The question is, is this possible with MDX or do i have to look at the data transferred to the DW and create a field called memberCount (or something like that... )

hope anyone can help.The PeriodsToDate MDX function seems like it would work for your scenario.

No comments:

Post a Comment