2 Replies Latest reply: Oct 21, 2016 10:15 AM by Oliver Krause

# How to get Sum of Max values in a diagram

Dear all,

I have a problem summing up the Max values over 2 dimensions.

What I thought to be basic seems to be quite tricky:

Two data sources ("Meldestelle") send usage data should ("Soll")/is ("Ist") for two services "Derivat"

I create a diagram with

• Bars abs."should" accumulated ->ok
• Bars abs."is" accumulated ->ok
• Line relative "should" ->problem
• Line relative "is" ->problem

For the latter 2 I tried

=sum(TIF_TABLE.accum_soll_h) / sum(Max(TOTAL TIF_TABLE.accum_soll_h))

Or alike but the divisor seems to evaluate wrong:

I would expect sum(Max(TOTAL TIF_TABLE.accum_soll_h)) to give me the max of - in this case the sum(TIF_TABLE.accum_soll_h).

All works out, when selecting ONE "Meldestelle" and ONE Derivat:

Over multiple it fails…

I also tried with aggr - like

sum(Aggr(Max(TIF_TABLE.accum_soll_h),TIF_TABLE.%MeldeStelle_Key ))

But results look even more strange…

Thanks Oliver

• ###### Re: How to get Sum of Max values in a diagram

See if these work:

=Sum(TIF_TABLE.accum_soll_h) / Max(TOTAL Aggr(Sum(TIF_TABLE.accum_soll_h), TIF_TABLE.I_Stufe.MeilenStein_Woche))

=Sum(TIF_TABLE.accum_ist_h) / Max(TOTAL Aggr(Sum(TIF_TABLE.accum_ist_h), TIF_TABLE.I_Stufe.MeilenStein_Woche))

• ###### Re: How to get Sum of Max values in a diagram

Hi Sunny,

thanks a lot - it took me several hours trying before I finally posted the question... You solved it! :-)

Have a nice weekend Oliver