Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Colors in a bar chart

So I found this wonderful trick (Qlikview Notes: A Color Trick) to change the color of some of the stacked bar charts to be lighter. I faced a similar situation. But I have 3 dimensions in my case: Company, Metric and Year.

The sum(value) of the metric is my expression. I have chosen year as my primary and Company as secondary dimension and the metric is stacked. I get only 2 colors when i use an expression like this:

if(Company=SubField($(vCompany),’,’,1),argb(75,255,255,255) bitand color(FieldIndex(‘Metric’,Metric)) , If(Company=SubField($(vCompany),’,’,2),argb(100,255,255,255) bitand color(FieldIndex(‘Metric’,Metric)),If(Company=SubField($(vCompany),’,’,3),argb(125,255,255,255) bitand color(FieldIndex(‘Metric’,Metric)),

If(Company=SubField($(vCompany),’,’,4),argb(150,255,255,255) bitand color(FieldIndex(‘Metric’,Metric)),If(Company=SubField($(vCompany),’,’,5),argb(175,255,255,255) bitand color(FieldIndex(‘Metric’,Metric)),If(Company=SubField($(vCompany),’,’,6),argb(200,255,255,255) bitand color(FieldIndex(‘Metric’,Metric)),If(Company=SubField($(vCompany),’,’,7),argb(255,255,255,255) bitand color(FieldIndex(‘Metric’,Metric)),color(FieldIndex(‘Metric’,Metric))))))))).

Please help..


2 Replies
Anonymous
Not applicable
Author

supriya  could you please share the sample data and screenshot  of your problem?

also try to explain your problem in detail...

Gysbert_Wassenaar

How many metrics do you have? That's the number of colors you'll see in various shades.

Can you post a small qlikview document that demonstrates the problem?


talk is cheap, supply exceeds demand