Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

pradosh_thakur
Honored Contributor II

Re: Color by Expression - Line Chart and Pie Chart

please try the same expression  in the background color of the measure. it should work. for me its working.

Learning never stops.
hlines_usacs
Contributor II

Re: Color by Expression - Line Chart and Pie Chart

Does Qlik Sense have "background colors of measures?"

Partner
Partner

Re: Color by Expression - Line Chart and Pie Chart

Background color of measure is available in Table

ishanbhatt
Contributor II

Re: Color by Expression - Line Chart and Pie Chart

Hi,

Might be this is possible because you match the values as a string. You wrote the values in a single quote. Remove that quote and it'll work for you.

F([Code] = 91

,red()

    ,IF ([Code] = 83

    ,blue()

        ,If(

 = 84

            ,yellow()

        ,green()

                )

        )

   )

Also, See the Code values which you compare.

Thanks,

Ishan

hlines_usacs
Contributor II

Re: Color by Expression - Line Chart and Pie Chart

That field is a string field. Some of the values in that field have letters. The ones I am displaying do not, but other values do.

With that, I have tried both ways (with single quotes and without them) multiple times.

Partner
Partner

Re: Color by Expression - Line Chart and Pie Chart

try instead of '='

use wildmatch() everywhere.

For ex:

IF(wildmatch([Code] ,'91'),

,red()

    ,IF (wildmatch([Code], 83),

    ,blue()

        ,If(wildmatch(

, 84),

            ,yellow()

        ,green()

                )

        )

   )