4 Replies Latest reply: Jun 6, 2017 2:51 AM by Morten Braüner RSS

    Legend Color when using BG color expressions in bar chart

    Morten Braüner

      Hi Qlik Community


      I have a bar chart with sales by month, with two expressions; this year (Flag_TY=1) and last year (Flag_LY=1). This works.

      However I also have an additional flag field for a fiscal year: Flag_FY. I want to indicate this in the chart by fading the color for months without Flag_FY=1.

      By using expressions in the background color for the expressions this works now, but I simply can't figure out how the legend color is determined?

      I want the legend to follow the "base" color from the color tab and not the faded version I apply by expression - see following screenshot:


      If I change the sorting of the Dimension - the legend color becomes correct. I would prefer it sorted like the above. And I would really like to understand why the sorting has an effect.

      So it must evaluate the background color expression somehow to create the legend? Maybe someone can suggest a workaround?

      I tried to create a copy of both expressions and let one pair be NULL for Flag_FY=1 and the other pair be NULL for Flag_FY=0. Unfortunately this creates a lot of empty white space in the chart and 4 expressions in the legend, so it is also a poor workaround.

      I attached a QlikView document with the dummy data demonstrating my issue.

      My QV version is 11.20 SR12.

      Thank you in advance.