0 Replies Latest reply: Sep 6, 2013 10:56 AM by Andrea Gigliotti RSS

    Pivot Table how to compare calculated dimensions values

    Andrea Gigliotti

      Hello,

       

      I have a pivot table with two calculated dimensions using Aggr() function.

      see below the 2 dimensions:

       

      first dimension:

      =if( aggr($(vMargAP), [Codice Cliente]) <= Fractile(total aggr($(vMargAP), [Codice Cliente]), 0.10), 10,

      if( aggr($(vMargAP), [Codice Cliente]) <= Fractile(total aggr($(vMargAP), [Codice Cliente]), 0.20), 9,

      if( aggr($(vMargAP), [Codice Cliente]) <= Fractile(total aggr($(vMargAP), [Codice Cliente]), 0.30), 8,

      if( aggr($(vMargAP), [Codice Cliente]) <= Fractile(total aggr($(vMargAP), [Codice Cliente]), 0.40), 7,

      if( aggr($(vMargAP), [Codice Cliente]) <= Fractile(total aggr($(vMargAP), [Codice Cliente]), 0.50), 6,

      if( aggr($(vMargAP), [Codice Cliente]) <= Fractile(total aggr($(vMargAP), [Codice Cliente]), 0.60), 5,

      if( aggr($(vMargAP), [Codice Cliente]) <= Fractile(total aggr($(vMargAP), [Codice Cliente]), 0.70), 4,

      if( aggr($(vMargAP), [Codice Cliente]) <= Fractile(total aggr($(vMargAP), [Codice Cliente]), 0.80), 3,

      if( aggr($(vMargAP), [Codice Cliente]) <= Fractile(total aggr($(vMargAP), [Codice Cliente]), 0.90), 2,

      if( aggr($(vMargAP), [Codice Cliente]) <= Fractile(total aggr($(vMargAP), [Codice Cliente]), 1), 1 ))))))))))

       

      second dimension:

      =if( aggr($(vMargAC), [Codice Cliente]) <= Fractile(total aggr($(vMargAC), [Codice Cliente]), 0.10), 10,

      if( aggr($(vMargAC), [Codice Cliente]) <= Fractile(total aggr($(vMargAC), [Codice Cliente]), 0.20), 9,

      if( aggr($(vMargAC), [Codice Cliente]) <= Fractile(total aggr($(vMargAC), [Codice Cliente]), 0.30), 8,

      if( aggr($(vMargAC), [Codice Cliente]) <= Fractile(total aggr($(vMargAC), [Codice Cliente]), 0.40), 7,

      if( aggr($(vMargAC), [Codice Cliente]) <= Fractile(total aggr($(vMargAC), [Codice Cliente]), 0.50), 6,

      if( aggr($(vMargAC), [Codice Cliente]) <= Fractile(total aggr($(vMargAC), [Codice Cliente]), 0.60), 5,

      if( aggr($(vMargAC), [Codice Cliente]) <= Fractile(total aggr($(vMargAC), [Codice Cliente]), 0.70), 4,

      if( aggr($(vMargAC), [Codice Cliente]) <= Fractile(total aggr($(vMargAC), [Codice Cliente]), 0.80), 3,

      if( aggr($(vMargAC), [Codice Cliente]) <= Fractile(total aggr($(vMargAC), [Codice Cliente]), 0.90), 2,

      if( aggr($(vMargAC), [Codice Cliente]) <= Fractile(total aggr($(vMargAC), [Codice Cliente]), 1), 1 ))))))))))

       

      I'd like to change expression text color if the first dimension value is greater than second dimension value.

       

      How can I achieve it ?

       

      Many thanks in advance.

       

      Best Regards

      Andrea