Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Double aggregation

Hi,

I can't solve this problem.I have a table with 3 dimensions (A, B, C) and one numeric value (H)

I want to create a chart with

One Dimension : A
One Expression :

The sum of H, calculated only for one value of B corresponding of the maximum of H for each C including in B

To calculate the Max for each B, i tried Max( Aggr( Sum(H) , B , C) ) => OK

But sum( Max( Aggr( Sum(H) , B , C) ) ) is not correct. I don't understand why ?

Maybe some help is welcome.

Regards

Jean-Jacques

4 Replies
johnw
Champion III
Champion III

Sorry, but I can't figure out what you want. Here's some sample data. What do you want the chart to display?

A B C H
1 1 1 1
1 1 2 2
1 2 1 4
1 2 2 8
2 1 1 16
2 1 2 32
2 2 1 64
2 2 2 128

Not applicable
Author

Hi John, thanks for your help

I want to display a chart with

A Expression

1 10 ( 2 + 😎

2 160 (32 + 128)

Hope to answer you

JJ

johnw
Champion III
Champion III

Well, I can get the right numbers for that data set with sum(aggr(max(H),A,B)), but I suspect that isn't what you want, since I still don't understand what you're trying to do. If that doesn't work for your real data, can you give me a better example data set?

Not applicable
Author

Thank you John, i made a mistake in the expression, your expression is working well.

jj