Help with Aggregate Function

Hello,

I am trying to aggregate two different custom field values in one report so I created two calculated fields with the below query. However, I get the error on the second field with “Should be same hierarchy{}”

Aggregate({
[Distributed Build].[In Use],
[Distributed Build].[Completed CICD Tool],
[Distributed Build].[In-Progress CICD Tool],
[Distributed Build].[Not Started],
[Distributed Build].[In-Progress],
[Distributed Build].[Scheduled],
[Distributed Build].[Partially Completed],
[Distributed Build].[On hold]
})

Aggregate({
[Func & Regression Test].[In Use],
[Func & Regression Test].[Completed CICD Tool],
[Func & Regression Test].[In-Progress CICD Tool],
[Func & Regression Test].[Not Started],
[Func & Regression Test].[In-Progress],
[Func & Regression Test].[Scheduled],
[Func & Regression Test].[Partially Completed],
[Func & Regression Test].[On hold]
})

Please let me know if there is a way to aggregate multiple custom fields or any alternate way.

Thanks
Vas

Hi Vas,

Are you putting both Aggregate declarations into a single custom calculated member?

– Malik Graves-Pryor

Hi Malik,

Yes, I am trying to put both in one calculated field.

Thanks
Vasanth

Hi Vasanth,

Ok, try putting each Aggregate declaration into its own custom calculated member. Then in a third custom calculated member do the following:

Aggregate(
[Measures].[Aggregate 1],
[Measures].[Aggregate 2]
)

That will create an aggregate of the two aggregated functions. Give that a whirl.

– Malik Graves-Pryor

Hi,

It would not be possible to aggregate members from two different dimensions into one dimension. That is the reason for this error.

Perhaps, you could merge these two fields already in the data source before you import in eazyBI as two different dimensions.

If you have eazyBI add-on for Jira, one workaround would be creating a new calculated custom field using Javascript in advanced settings.

https://docs.eazybi.com/display/EAZYBIJIRA/JavaScript+calculated+custom+fields

Martins / eazyBI