6 Replies Latest reply: Jan 26, 2016 6:40 AM by Oliver Krause RSS

    Relative + Absolute values in diagram - Sync left & right axis + 100% issue

    Oliver Krause
      Dear all,
      I need to draw a diagram like this:
      grey bars: Accumulated absolute values
      green line: Relative value of the same values
      Basically I use this formula in the script to get the 100% value:
      SET eMaxSoll=Sum(TOTAL  Aggr( Sum( $1 * vAnzahl_SollPF), %IWeek));
      And this as expression for the diagram's green line:
      =RangeSum(
      Above(
      Sum( [Config_Soll.Soll-Wert]*vAnzahl_SollPF),
      0,
      RowNo()
      )
      )/$(eMaxSoll([Config_Soll.Soll-Wert]))
      The grey bars are the absolute accumulated values for the same… using this formula
      =RangeSum(
      Above(
      Sum( [Config_Soll.Soll-Wert]*vAnzahl_SollPF),
      0,
      RowNo()
      )
      )
      The diagram above only differs in vAnzahl_SollPF=2 setting and looks perfect.
      2 QUESTIONS:
      1: My problem is when I set vAnzahl_SollPF=1 I get this curve, which ends up at 112% instead of 100% and I have no clue why?
      In other cases it ends up lower than 100%... Why?
      What will be the correct formulas to always end at 100% ?
      2: Is there a way to always synchronize left and right scale so that 100% always is on the same hight as the max. absolute even when having other higher bars in the diagram like this (I would like the green line to end at 100% = top of rightmost grey bar = 5600 - no matter how high the right scale goes (driven by blue bars...)
      Thanks for your help!
      Oliver