0 Replies Latest reply: Oct 5, 2016 4:04 PM by Caio Lobato RSS

    Line Chart with Color Condition (Variance TYvsLY)

    Caio Lobato

      Hi,

       

      How can I create this line chart here?

       

      Capturar.PNG

      just explaining a bit more, this is a sales comparsion between Actual Year and Last Year (just months "Jan,Feb,Mar" for both years)

       

      the color in the area shows the variance TY vs LY, when the variance is negative it shows a red tone and if is positive it shows blue tone

       

      This is the color expression that I was trying to do but it not worked

       

      colormix2(

      (

      Sum({$<Year={'$(=max(Year))'}>}quantity*price_unit)

      /

      Sum({$<Year={'$(=max(Year)-1)'}>}quantity*price_unit)

      )

      -1

      ,

      red(), // minus one color

      white(), // 0 color

      blue() // plus one color

      )

       

      ps: I am already using the Qlik Sense 3.1, this release looks like better to work with color conditions