1

I have a slow MDX query that does the following:

WITH MEMBER Measures.DistinctCode as 'DistinctCount({[CODE].Children})'
SELECT 
NON EMPTY Hierarchize({DrilldownLevel({[DATE].[ALL].[AllMember]})}) ON ROWS,
NON EMPTY Hierarchize({DrilldownLevel({[SYSTEM].[ALL].[AllMember]})}) ON COLUMNS
FROM [CUBE]
WHERE ([Measures].[DistinctCode])

How could I write a post processed measure in ActivePivot that returns the same as my Distinct Count calculated member? I imagine this would be a lot faster?

Thanks

doc
  • 765
  • 1
  • 6
  • 24
  • Possible duplicate of [How can I create a "distinct count" measure with ActivePivot](https://stackoverflow.com/questions/23412641/how-can-i-create-a-distinct-count-measure-with-activepivot) – Benjamin Amelot Jun 15 '18 at 14:50

1 Answers1

1

Have you looked at the LeafCountPostProcessor that ships out of the box in the open-source activepivot-ext artifact?

com.quartetfs.biz.pivot.postprocessing.impl.LeafCountPostProcessor
Antoine CHAMBILLE
  • 1,676
  • 2
  • 13
  • 29