1 Reply Latest reply: Jun 28, 2017 5:56 AM by anand varadhan RSS

    Colors for bars based on Target

    ij qlik

      Hi All,


      I am having a bar chart in qliksense application which needs to show based on target value.

      If bar is higher than target then it will be green else red.

      This bar chart will have the two set of expression like previous month and previous year.

      So I need to show the Bars based on Target value either in Red or Green based on Target on both 'Previous Month' and 'Previous Year' view


      The below expression used in "Measure"

      Exp 1:

      if(v_set_reset=1,sum({<MetricName= {'M1'},Period = {'$(=$(v_previous_month))'}>}vlaue),

      (sum({<Level2Name = {'Perfect Index'},Year = {'$(=$(v_previous_year))'}>}Level2vlaue))/12)


      The Target expression used in Colors

      Exp 2:

      (only({<metric_id = {'51'},loc= {'1'}>}boundary),RGB(70,198,70),RGB(249,63,23))


      so if Exp 1 > Exp 2 RGB(70,198,70),RGB(249,63,23)