Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

yura_ratu
Contributor II

Custom color for dimmensions

Hi all,

I have file with such columns: MetricID, MetricValue, MetricColor

Metric color has format 'RGB(X,Y,Z)'

On a chart I want to represent each metric with color from MetricColor column. How can I do it?

Example attached.

Tags (2)
1 Solution

Accepted Solutions

Re: Custom color for dimmensions

In your script load statement, use the evaluate function to convert your rgb() syntax to proper color numbers:

LOAD Metric,

    MetricValue,

    evaluate(MetricColor) as MetricColor

FROM ...

Click the + next to your expression. For the Background Color attribute enter:

=MetricColor

-Rob

http://masterssummit.com

http://robwunderlich.com

3 Replies
consenit
Contributor II

Re: Custom color for dimmensions

Hi there.

In my experience you have to assign a separate field to each color components (Red, Green, Blue) then assign the background color to each expression using the RGB function:

=RGB(RedFieldName, GreenFieldName, BlueFieldName)

Kind regards,

Ernesto.

Re: Custom color for dimmensions

In your script load statement, use the evaluate function to convert your rgb() syntax to proper color numbers:

LOAD Metric,

    MetricValue,

    evaluate(MetricColor) as MetricColor

FROM ...

Click the + next to your expression. For the Background Color attribute enter:

=MetricColor

-Rob

http://masterssummit.com

http://robwunderlich.com

Gabriel
Valued Contributor II

Re: Custom color for dimmensions

Hi,

My suggestion which works well for me is to load the RGB value for each RGB along with the value see below and then click the plus sign for  background in Expression Tab as

=RGB(ONLY(RED),ONLY(GREEN),ONLY(BLUE))

 

REDGREENBLUEMetricMetricValue
14105212174
2311759275
59174215311
75162250423
76187111538
85102238665
9773193715
11918865846
1246856943
12569401084
134161111180
1661582421211
201152321354
202602271445
233902411587
23561101686
24083181769
24946168182
25486102193
Community Browser