Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

kathrine_spang
New Contributor II

Color lines with expression, line chart

The measurements added to the line chart are

avg({<signal={"AA"}>}  [Measurement])

avg({<signal={"BB"}>}  [Measurement])

avg({<signal={"CC"}>}  [Measurement])

avg({<signal={"DD"}>}  [Measurement])


And dimension date. This works fine and I get four lines one for the measurements corresponding to each signal name.


The i try to color them by expression since I want to customize the colors. This is where I get stuck. I've tried the following:

if(([signal]='AA'), [Measurement]= red(),

     if(([signal]='BB'),  [Measurement]=green(),

          if(([signal]='CC'),[Measurement]=black(),

               if(([signal]='DD'),[Measurement]=yellow(),blue())

           )

      )

)

(this one I also tried with RGB code. and without the "[Measurement]=" part

and

if((avg({<signal={"AA"}>}  [Measurement])), red(),

     if((avg({<signal={"BB"}>}  [Measurement])), green(),

          if((avg({<signal={"CC"}>}  [Measurement])'),black(),

               if((avg({<signal={"DD"}>}  [Measurement])), yellow(),blue())

           )

      )

)

and

pick(WildMatch((avg({<signal={"AA"}>}  [Measurement])),

(avg({<signal={"BB"}>}  [Measurement])),

    (avg({<signal={"CC"}>}  [Measurement])),

        (avg({<signal={"DD"}>}  [Measurement]))),

red(),

blue(),

green(),

yellow()

)

and some other variants on these.

Would be so thankful for help

Tags (2)
1 Reply
kathrine_spang
New Contributor II

Re: Color lines with expression, line chart

I realized I might be able to create master measurements to do what I wanted but I can't seem to find how to color master measurements in Qlik Sense 3.0

Does anyone know if that is possible else my original question stands.