9 Replies Latest reply: Nov 21, 2017 9:51 AM by Sunny Talwar RSS

    Measure evaluating by the max dimension

    William Fu

      This is hard to explain, but I need to force the values on a chart to calculate based on their domain.

       

      Here is the Set Analysis for "_Vl Carteira", which basically excludes the sum when either DtPrej or DtPrejGer are smaller than DtRef

       

      Sum({($-<DtPrej = {"$(= '<' & DtRef)"}> - <DtPrejGer = {"$(= '<' & DtRef)"}>)

      *

      <ProdutoFinanceiro -={'XYZ', 'ASD'},

      DtRef = {"=Day(DtRef)=1"}>}

      Saldo)

       

      As you can see by the behavior below, the measure seems to calculate based on the max DtRef available (in this case 2017-Nov) However, it calculates correctly when only its own DtRef.YearMonth dimension is selected (matches the KPI object value).

       

      Can anyone help me with the expression? Maybe something with Aggr()?

      (And yes, I do realize that putting a flag on my script for the date comparison would be a better solution.)

       

      measureecarteira.png