Hi all!
I use the following MDX query which is used as a KPIValue:
SUM(
{[Measures].[ID Distinct Count]}
*
(
EXCEPT([Suspension Start Date].[Date].AllMembers, [Suspension Start Date].[Date].[Year].&[-1])
, [Policy2].[Is Issued].&[1]
,
{
[Risk Commencement Date].[Date].CurrentMember : [Risk Commencement Date].[Date].CurrentMember.Lead(365)
}
)
)
It counts those policies where the risk commencement date is in a 365 day frame starting from the selected day. I also check whether the given policy has issued or not. In the KPIValue, I also need to check for suspensions. Suspension start date should not be NULL, in my case that's the whole dimension except [Suspension Start Date].[Date].[Year].&[-1] .
If I use Lead(12) instead of Lead(365) (my Date role-playing dimension's cardinality is day), it never gives back a timeout error. What's wrong with this query? Is the CrossJoin should be replaced with something else? With Lead(12) it takes about 1 second to return the results. Expecting linearity Lead(365) runs for about 30 seconds. It needs to give back results within 1 second by specification.