
1. Re: How to find aggregate of aggregate? Example Min( Sum() )?
Hari Ankem Sep 11, 2017 12:28 PM (in response to Vinh Ton)1 of 1 people found this helpfulUse the Window function. WINDOW_MIN(SUM([measure]))

2. Re: How to find aggregate of aggregate? Example Min( Sum() )?
Vinh Ton Sep 11, 2017 12:36 PM (in response to Hari Ankem)Thanks, this works for this table scenario.
Curious if there are other solutions that wouldn't rely on the table and its position

3. Re: How to find aggregate of aggregate? Example Min( Sum() )?
Hari Ankem Sep 11, 2017 12:40 PM (in response to Vinh Ton)I need to understand your scenario to answer accordingly.

4. Re: How to find aggregate of aggregate? Example Min( Sum() )?
Nicholas Hannan Sep 12, 2017 7:50 AM (in response to Vinh Ton)1 of 1 people found this helpfulHi Vinh,
Check out Level of Detail calculations.
Overview: Level of Detail Expressions
MIN({ FIXED <your dimensions>: SUM(<your measure>) })
It may be helpful to have a more specific example along with a packaged workbook to give a more specific example.
Best regards.

5. Re: How to find aggregate of aggregate? Example Min( Sum() )?
Deepak Rai Sep 12, 2017 9:00 AM (in response to Vinh Ton)This Calculation1 will FIX Minimum of your SUM across entire Dimension because it is aggregated at Dataset level scope.
Thanks
Deepak

MIN_SUM.twbx 10.2 KB


6. Re: How to find aggregate of aggregate? Example Min( Sum() )?
Vinh Ton Sep 12, 2017 9:22 AM (in response to Nicholas Hannan)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)
)
}
Origin Destination Carrier Weight Cost Cost per Weight Cheapest A B Shipping1 1 6 6 3 A B Shipping2 2 8 4 3 A B Shipping3 3 9 3 3 A C Shipping1 4 12 3 2 A C Shipping4 5 10 2 2