![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I wondered if anyone might be able to help me to speed up a calculated member by improving on the MDX. I want to count the leaf level members of our Policy.NewCOB dimension only where another calculated measure, Test1, exists (this member is null for some policies). I have created the count member, Test2, thus: Count(Filter(Descendants([Policy].[NewCOB].CurrentMember, [PolId]), (NOT IsEmpty([Measures].[Test1])))) but because there are 170 000 or so policies, this is very slow. Any ideas gratefully received! |
#3
| |||
| |||
|
|
How about next expression? Count( CrossJoin(Descendants([Policy].[NewCOB].CurrentMember, [PolId]), {[Measures].[Test1]}), ExcludeEmpty ) If you use AS 2005, you can consider use NonEmpty or exists functions. For example, Count(NonEmpty(Descendants([Policy].[NewCOB].CurrentMember, [PolId]), [Measures].[Test1])) Because NonEmpty function is optimized function to remove empty tuple. Ohjoo "rachel" <rachel.jones (AT) talbotuw (DOT) com> wrote in message news:1163085556.743430.277210 (AT) h48g2000cwc (DOT) googlegroups.com... I wondered if anyone might be able to help me to speed up a calculated member by improving on the MDX. I want to count the leaf level members of our Policy.NewCOB dimension only where another calculated measure, Test1, exists (this member is null for some policies). I have created the count member, Test2, thus: Count(Filter(Descendants([Policy].[NewCOB].CurrentMember, [PolId]), (NOT IsEmpty([Measures].[Test1])))) but because there are 170 000 or so policies, this is very slow. Any ideas gratefully received! |
#4
| |||
| |||
|
|
Thank you very much Ohjoo, that does also work but unfortunately is as slow as the other method. We are going to upgrade to AS2005 so maybe that will improve the speed, but non empty doesn't really help as all our measures are populated (ie there are no nulls in them, they all evaluate to zero if empty). Rachel Ohjoo Kwon wrote: How about next expression? Count( CrossJoin(Descendants([Policy].[NewCOB].CurrentMember, [PolId]), {[Measures].[Test1]}), ExcludeEmpty ) If you use AS 2005, you can consider use NonEmpty or exists functions. For example, Count(NonEmpty(Descendants([Policy].[NewCOB].CurrentMember, [PolId]), [Measures].[Test1])) Because NonEmpty function is optimized function to remove empty tuple. Ohjoo "rachel" <rachel.jones (AT) talbotuw (DOT) com> wrote in message news:1163085556.743430.277210 (AT) h48g2000cwc (DOT) googlegroups.com... I wondered if anyone might be able to help me to speed up a calculated member by improving on the MDX. I want to count the leaf level members of our Policy.NewCOB dimension only where another calculated measure, Test1, exists (this member is null for some policies). I have created the count member, Test2, thus: Count(Filter(Descendants([Policy].[NewCOB].CurrentMember, [PolId]), (NOT IsEmpty([Measures].[Test1])))) but because there are 170 000 or so policies, this is very slow. Any ideas gratefully received! |
![]() |
| Thread Tools | |
| Display Modes | |
| |