Count of a calculated measure

I have dimension ‘Reporter Group’

The members are a variety of distribution lists

I have created a calculated member that is the sum of two members

Aggregate({
  [Reporter Group].[dl NPI Srini],
  [Reporter Group].[dl NPI TV India(GL)]
})

Now I want to get the count of members in that calculated members.

If I create a measure

Aggregate({
  [Reporter Group].[dl NPI Srini],
  [Reporter Group].[dl NPI TV India(GL)]
})

how do I get the count for this measure? Currently it is double counting some items.

Hi,

The Reporter Group dimension does not contain any information about particular reporters within this group.

You may do the opposite: count dimension Reporter members having particular reporter groups in the property "Reporter groups ".

For that, create a measure (in Measures) to count reporters having one or another user group:

Count(
 Filter(
  [Reporter].[User].Members,
  [Measures].[Reporter groups] matches ".*dl NPI Srini.*|.*dl NPI TV India(GL).*"
 )
  )

Best,

Ilze / support@eazybi.com

If I add that measure I get the following error message

#ERR: mondrian.olap.fun.MondrianEvaluationException: Expected value of type BOOLEAN; got value 'mondrian.olap.fun.MondrianEvaluationException: Exception while executing function MATCHES: java.lang.NullPointerException at java.util.regex.Matcher.getTextLength(Matcher.java:1283) at java.util.regex.Matcher.reset(Matcher.java:309) at java.util.regex.Matcher.(Matcher.java:229) at java.util.regex.Pattern.matcher(Pattern.java:1093) at java.util.regex.Pattern.matches(Pattern.java:1134) at mondrian.udf.MatchesUdf.execute(MatchesUdf.java:30) at mondrian.olap.fun.UdfResolver$ScalarCalcImpl.evaluate(UdfResolver.java:198) at mondrian.calc.impl.GenericCalc.evaluateBoolean(GenericCalc.java:126) at mondrian.olap.fun.FilterFunDef$MutableIterCalc.makeIterable(FilterFunDef.java:168) at mondrian.olap.fun.FilterFunDef$BaseIterCalc.evaluateIterable(FilterFunDef.java:124) at mondrian.calc.impl.AbstractIterCalc.evaluate(AbstractIterCalc.java:50) at mondrian.olap.ExpCacheDescriptor.evaluate(ExpCacheDescriptor.java:100) at mondrian.rolap.RolapEvaluator.getCachedResult(RolapEvaluator.java:1058) at mondrian.olap.fun.CacheFunDef$1.evaluate(CacheFunDef.java:63) at mondrian.calc.impl.GenericIterCalc.evaluateIterable(GenericIterCalc.java:72) at mondrian.olap.fun.AbstractAggregateFunDef.evaluateCurrentIterable(AbstractAggregateFunDef.java:101) at mondrian.olap.fun.CountFunDef$1.evaluateInteger(CountFunDef.java:60) at mondrian.calc.impl.AbstractIntegerCalc.evaluate(AbstractIntegerCalc.java:45) at mondrian.rolap.RolapEvaluator.evaluateCurrent(RolapEvaluator.java:804) at mondrian.rolap.RolapResult.executeStripe(RolapResult.java:1050) at mondrian.rolap.RolapResult.executeStripe(RolapResult.java:1185) at mondrian.rolap.RolapResult.executeStripe(RolapResult.java:1185) at mondrian.rolap.RolapResult.executeBody(RolapResult.java:922) at mondrian.rolap.RolapResult.(RolapResult.java:480) at mondrian.rolap.RolapConnection.executeInternal(RolapConnection.java:651) at mondrian.rolap.RolapConnection.access$000(RolapConnection.java:53) at mondrian.rolap.RolapConnection$1.call(RolapConnection.java:602) at mondrian.rolap.RolapConnection$1.call(RolapConnection.java:600) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) ’ (class mondrian.olap.fun.MondrianEvaluationException)

Also, what does the .* mean in front of the Reporter Group name in the calculated measure?

Was able to solve my issue.
thanks