I am trying to calculate the counts of issues for the prior 3 months as a percent of the total of all issues for the prior 3 months. eg. For Sept. I would need the counts for Jun, Jul, Aug for each issue type divided by the total number for all issue types
for those 3 months..

For the numerator I used the following and have confirmed that it is correct via SQL queries.

CREATE MEMBER CURRENTCUBE.[Measures].[PctUniqueIssuesNumerator] AS Aggregate

( {[IssueDate].[ProgMonth].CurrentMember.Lag(3) : [IssueDate].[ProgMonth].CurrentMember.Lag(1)}

*

[InvoiceIssueType].[Invoice Issue Type].CurrentMember

,

[Measures].[Invc Id Distinct Count - IssueFact]

),

VISIBLE = 1;

For the denominator I am using this MDX but doesnt seem to be correct. Should I be doing it differently? I need the sum of [Invc Id Distinct Count - IssueFact] for all issues types for the prior 3 months.

CREATE MEMBER CURRENTCUBE.[Measures].[PctUniqueIssuesDenominator] AS Sum(

DESCENDANTS([InvoiceIssueType].[Invoice Issue Type].[All],1),

## AGE CALCULATION IN YEARS AND MONTHS