EazyBi : Aggregate function returns a wrong total

Hi everybody,

I am experiencing unexpected behavior with the following code in calculated measures:

Aggregate(
  Filter(
    Descendants([Issue].CurrentMember, [Issue].[Issue]),
    IsEmpty([Measures].[Issue Date intégration])
  ),
  [Measures].[Issue Nb de Folio]
)

The code returns the total for all issues on every row instead of computing by row member. However, when I use “drill through issues” on a single row, it correctly filters the issues by row members.
(On the “drill through” screen shot, it shows the correct list of issues and correct row count but the “Total value” should be 61 instead of 3627)

Hi @Pierre.Boucherie
Thanks for posting your question!

Both [Measures].[Issue Date intégration] and [Measures].[Issue Nb de Folio] are issue properties (prefixed with “Issue”) and when used with Aggregate function, it will not work correctly with report context. So in fact, the behavior is expected, because only measures are what provide context to the report.

To learn about properties and measures, please read the section about measures and properties here Main concepts
I also encourage to take a look at our learning center (find out how to activate it here - Learning Center, if you don’t have time to look at all lessons, please dedicate some time for the class - Dimensions, measures, and properties.

However, what I am also noticing, is that you are filtering the report by 2025 and I am not entirely sure to which date this time filter should be tied. When using the TIme dimension and expecting the results to dynamically respond to the filter, you should again - use correct measures

So for example,
You may try defining the a new calculated measure with formula below. It will iterate through each issue, find those that don’t have “Date intégration” and sum the values in field NB de Folio for issues created in 2025. If you’re looking for 2025 filter to be tied to a different date, use a different measure. For example “Nb de Folio with your custom date

Sum(
  Filter(
    Descendants([Issue].CurrentMember, [Issue].[Issue]),
    IsEmpty([Measures].[Issue Date intégration])
  ),
  [Measures].[Nb de Folio created]
)

Let’s assume that my field “Number Selection” is your field “Nb de Folio” field. When you import this field as a measure, you will notice that this field is tied with various date fields (creation date, due date, resolution date, closed date etc…). The report will respond diffrently for each measure you choose, based on the Time filter you select. So when defining the above measure, choose that measure for which you expect Time filter to be connected with.
If Time filter should be irrelevant for the above filter, you can use the measure with the defaultmember - similarly as shown here. DefaultMember

I hope this clarifies your question! if you have any follow-up questions, please let me know!

Best wishes,

Elita from support@eazybi.com