2 Replies Latest reply: Dec 30, 2011 4:23 AM by Richard Pearce RSS

    Background Chart Expression Color using Set Analysis

      Hi, Hope you all had a good Christmas and apologies if this is a simple question.

       

      (Note - Example Attached)

       

      I'm trying to use set analysis to set the rgb() of a chart expression background without much luck. Is this possible?

       

      I've set up a 'Heat Map' table which I want to use to show additional percentage information on a chart. I'm using some simple set

      analysis to reference the colour table although the results are not as expected.

       

      The example QV QVW should hopefully explain a little better.

       

      Many thanks

       

      Richard

        • Re: Background Chart Expression Color using Set Analysis
          John Witherspoon

          A set is calculated for an entire chart, not for a row of the chart.  The same is true of dollar sign expansion.  So your $(=sum(Value)) calculates the total value.  This total value is much higher than your table allows, so there are no RGB values to be found.  Even if it found one, it would apply the same value to every bar in the chart.

           

          You'll want to do this without set analysis and without dollar sign expansion if you want a different color for every bar.

           

          These seem to work, if I understood what you want.  There might be a simpler solution.

           

          only(aggr(if(HeatMapId=sum(Value),
          rgb(HeatMapRed,HeatMapGreen,HeatMapBlue)),HeatMapId,DateNum))

           

           

           

           

           

           

          only(aggr(if(HeatMapId=round(sum(Value)/sum(total Value)*100/2),
          rgb(HeatMapRed,HeatMapGreen,HeatMapBlue)),HeatMapId,DateNum))