Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

anuhegde
New Contributor III

Color dispappears when Master Dimension containing a variable is used in line chart

Hi all,

I have a line chart and the dimension used in Country. It is a master dimension.It contains a variable vCountry which is nothing but the country field. The color property is set to color by dimension but the color appears to be gray. I edited the master dimension,removed the variable $(vCountry) and directly used the Country field. The color appeared.

Any idea why does the color turns to gray when variable is used?

Thanks in advance

Anusha

1 Solution

Accepted Solutions
anuhegde
New Contributor III

Re: Color dispappears when Master Dimension containing a variable is used in line chart

This seems to be working.

I changed the definition of variable to [Country] from Country and the color appears.

Don't understand how it makes a difference.

11 Replies
YoussefBelloum
Esteemed Contributor

Re: Color dispappears when Master Dimension containing a variable is used in line chart

Hi,

did you try using the same variable when you put color as expression ?

anuhegde
New Contributor III

Re: Color dispappears when Master Dimension containing a variable is used in line chart

Hi,

Yes. I did. It is still gray

praveenkumar_ma
Contributor

Re: Color dispappears when Master Dimension containing a variable is used in line chart

Hi Anusha,

Try giving Column Name , Instead of Expression at the Place of Color Expression ..

Regards

PM

Re: Color dispappears when Master Dimension containing a variable is used in line chart

Hi Anusha,


your variable should evaluate to the dimension name...I think your evaluating at the dim level ? could give your variable definition also

anuhegde
New Contributor III

Re: Color dispappears when Master Dimension containing a variable is used in line chart

Hi Avinash,

Sure

Variable name: vCountry

Definition: Country

In the master Dimension: =$(vCountry)

Re: Color dispappears when Master Dimension containing a variable is used in line chart

do you have calculation here ? because if you just have the dim name you could directly use it rite? why the need of variable

praveenkumar_ma
Contributor

Re: Color dispappears when Master Dimension containing a variable is used in line chart

You Can try this as Color Expression

='$(vCountry)'

anuhegde
New Contributor III

Re: Color dispappears when Master Dimension containing a variable is used in line chart

We use variables in most of the places. They are created in an excel file and this excel file will be loaded to the application.

no calculation

anuhegde
New Contributor III

Re: Color dispappears when Master Dimension containing a variable is used in line chart

This seems to be working.

I changed the definition of variable to [Country] from Country and the color appears.

Don't understand how it makes a difference.