Calculated member on issue where a field is not empty

Hi,
I’m trying to build a calculated member for the Issue dimension, I want to select only the issues with the “ID OTT” custom field that’s not empty.
I tried something like this:

Aggregate(
  Filter(
    [Issue].Members,
    ([Issue].CurrentMember.get('ID OTT') matches '.')
    )
)

but I get an awful error in return :expressionless:

#ERR: mondrian.olap.fun.MondrianEvaluationException: Expected value of type BOOLEAN; got value 'mondrian.olap.fun.MondrianEvaluationException: Exception while executing function MATCHES: java.lang.NullPointerException ’ (class mondrian.olap.fun.MondrianEvaluationException)

I went a little more forward than that and I think I made it.

Aggregate(
   Filter([Issue].[Issue].Members, 
       not IsEmpty([Issue].[Issue].CurrentMember.get('ID OTT'))
   )
)
2 Likes

Hi @Mauro_Bennici,

It is good to hear you found a solution on your own. Although, I don’t recommend defining such broad calculated members in the Issue dimension. That can result in report performance problems.

As an alternative, you can try defining a calculated measure to filter the the Issue dimension “Issue” members by:

NonZero(
  [Measures].[Issues created]
  -
  ([Measures].[Issues created],[ID OTT].[(none)])
)

Depending on the use-case, you can use the calculated measure above if the “ID OTT” custom field is also imported as a dimension.

See the picture below:


The report shows the total number of issues and the number of issues with a value in the custom field “Squad”. You can then filter the report’s rows and select the “Issue” level, if necessary.

Please have a look at our documentation page for more information on filtering rows - https://docs.eazybi.com/eazybijira/analyze-and-visualize/create-reports#Createreports-Orderandfilterrowsbymeasurevalues.

Best,
Roberts // support@eazybi.com

thanks @roberts.cacus, it seems to work all right as for now, I’ll keep in mind your solution in case I get some performance issue.
regards.