Custom measure don't change with pages

I have made a custom measure from a custom field:

Count(
  Filter(
    --iterate through linked members
    Descendants([Issue].CurrentMember, [Issue].[Issue]),
    [Measures].[count linked issues] - [Measures].[count linked issues MIN]= 0
  )
)

Where
[Measures].[count linked issues]:

Count([linked issues].[linked issues].GetMembersByKeys([Issue].CurrentMember.Get('linked issues'))
)

[Measures].[count linked issues MIN]:

Count([Issue].[Issue].GetMembersByKeys([Issue].CurrentMember.Get('linked issues'))
)

This works like it should. The problem I have is that when I uses the filters from Pages (eg Time, Issue type, Status), this doesn’t change.

What do I have to do to make this work or is the problem that these records are also calculated on the field “Linked Issues”?

Hi @_P3,

The measure is the core element of each calculation that allows the calculation to respond to selected values in page filters, rows, and columns. The measure is the treasure!
Here is documentation on ground rules for calculations.

In your case, the calculation is based on issue properties, and you might want to add the measure “Issues created” as filter criteria.

Count(
  Filter(
    --iterate through individual issues
    Descendants([Issue].CurrentMember, [Issue].[Issue]),
    [Measures].[count linked issues] - [Measures].[count linked issues MIN] = 0
    --and issues match the selected report context (filter criteria on pages)
    AND [Measures].[Issues created] > 0
  )
)

Best,
Zane / support@eazyBI.com

1 Like