Getting the count of specific value in given field

Hi,

Am a newbie trying to learn EazyBi features.

On closing an issue, we add the reason for closure. Field “Closed Reason” can be “Software”, “Hardware” etc. We want to count number of specific value of “Closed Reason” over time interval.

In “Pages’”, we have added “Closed Reason”, and highlighted Select members -> “All Closed Reason”. In “Rows”, we have added “Time” and highlighted “All hierarchy level members” -> Month.

This formula does not count correctly the number of the bugs closed due to “Software” for each month.

Aggregate(
Filter(
[Closed Reason].Members,
[Closed Reason].CurrentHierarchyMember.Name MATCHES ‘Software Change’
)
)

Any suggestions to correct this.

Thanks,
Vrukesh

We could resolve this query. Used below formula something like this:

NonZero(
Count(
Filter(
Descendants([Issue].CurrentHierarchyMember,[Issue].[Issue]),
[Measures].[Issues closed] > 0 AND
(
[Measures].[Issue Closed Reason] = “Software”
)
)
))

1 Like

Hi @vrukesh!

I imagine you could solve this without any calculations. Just by adding the Issues closed measure on columns and also adding the Closed reason expanded to lower level next to Measures on columns and Time on rows you would see issues closed for each reason grouped by their closing reason and closing date.

Please let me know if you have further questions regarding this!
Lauma / support@eazybi.com

Hi Lauma,

Yes, the suggested solution works! Thanks for that!

We wanted to further use the value for some calculations. Hope the formula mentioned above is fine too.

Thanks,
Vrukesh

1 Like

@vrukesh,

In such a case, while the formula is correct, it might be resource consuming. It is worth checking if tuple does what you need (https://docs.eazybi.com/eazybi/analyze-and-visualize/calculated-measures-and-members/calculated-measures#Calculatedmeasures-Tuples) :

(
  [Measures].[Issues closed],
  [Closed Reason].[Software]
)

Lauma / support@eazybi.com

Hi Lauma,

yes, this indeed helps to speed up the calculation!!!

Thanks a ton! :slightly_smiling_face:
Vrukesh

1 Like