5 Replies Latest reply: Jan 30, 2017 1:23 AM by Feras Alsuhaibani RSS

    Pivot Table Background Coloring when Expanded Only

    Feras Alsuhaibani

      Hello everyone!

       

      I have been working with Pivot Tables lately, and I was asked to color some pivot tables cells based on a measure value. For example:

       

      Having the following table:

       

      ID               ,                  Name              ,    Duration         

       

      1                ,               Joe                    ,   10

      2                ,              Lee                     ,   11

      3               ,               Joe                    ,    12

      4                ,              Lee                     ,   13

      5                ,               Joe                    ,   14

      6                ,              Lee                     ,   15

      7               ,               Joe                    ,    16

      8                ,              Lee                     ,   17

       

      Now every duration greater or equals 14 should be colored red, otherwise green, and here is my expression:

       

      if(Duration >= 14, red(), Green() ) )

       

      My issue is when the table is collapsed, the sum of Joe and Lee will be RED. What I want is for the coloring to appear when expanding the table only.

       

       

      Thanks!