I think this should be fairly straightforward but something is eluding me.
I want a count of issues that have a specific field empty. I seem to be able to get that count easily enough for the entire data cube but, when I add page filters to my report, this measure ignores them (e.g. if I add page filters for Status or Labels etc).
What am I missing?
Count(
Filter(
[Issue].Members,
NOT IsEmpty([Issue].CurrentMember.Get(<field name>)
)
)
Iāve figured it out with a little more creative searching and also taking the mantra āthe measure is the treasureā to heart. With the guidance from Iterate though issue level filtering by Pages, I updated it like so and it works (also changed Count to Sum in the process and canāt be bothered to go back):
Sum(
Filter(
[Issue].Members,
[Measures].[Issues created] > 0
),
IIf(
NOT IsEmpty(<measure that returns field name>),
1, 0
)
)
Hi @chrispy35
Youāre right on with the āMeasure is Treasureā mantra!
The dimension members in the report context (in Rows or in Page filters) adjust the measures used in the report, they donāt have an impact on the properties.
Since your first formula is filtering a set of issues by only a property, all results will be the same, no matter the report context.
However, when filtering a set of issues, it is recommended to filter by properties first, as in the database level they are in the same table as the issues, so it will have the best performance.
Hereās an optimized version of your formula:
Sum(
Filter(
Descendants([Issue].CurrentMember, [Issue].[Issue]),
NOT IsEmpty([Issue].CurrentMember.Get(<field name>))
),
IIf(
[Measures].[Issues created] > 0,
1,
null
)
)
āBest regards,
Nauris