6 Replies Latest reply on Sep 12, 2017 9:22 AM by Vinh Ton

# How to find aggregate of aggregate? Example Min( Sum() )?

Is there a workaround for finding the aggregate of an aggregate?

See the example below where I'm trying to find the Min of sums?

Thanks

Dimension

SumMin
A1: (1)1
B2: (1+1)

1

C3: (1+1+1)1
• ###### 1. Re: How to find aggregate of aggregate? Example Min( Sum() )?

Use the Window function. WINDOW_MIN(SUM([measure]))

1 of 1 people found this helpful
• ###### 2. Re: How to find aggregate of aggregate? Example Min( Sum() )?

Thanks, this works for this table scenario.

Curious if there are other solutions that wouldn't rely on the table and its position

• ###### 4. Re: How to find aggregate of aggregate? Example Min( Sum() )?

Hi Vinh,

Check out Level of Detail calculations.

It may be helpful to have a more specific example along with a packaged workbook to give a more specific example.

Best regards.

1 of 1 people found this helpful
• ###### 5. Re: How to find aggregate of aggregate? Example Min( Sum() )?

This Calculation1 will FIX Minimum of your SUM across entire Dimension because it is aggregated at Dataset level scope.

Thanks

Deepak

• ###### 6. Re: How to find aggregate of aggregate? Example Min( Sum() )?

Thank you for contributions, really enjoyed seeing the different approaches

The one I settled on is a LOD withing a LOD:

This examples gives the Cheapest Carrier

{ Fixed Origin ,Destination

:Min(

// cost per weight of this carrier for this route

{ Fixed  Origin ,Destination ,Carrier

: Sum( cost ) / Sum (weight)

)

}

OriginDestinationCarrierWeightCostCost per WeightCheapest
ABShipping11663
ABShipping22843
ABShipping33933
ACShipping141232
ACShipping451022