Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
yura_ratu
Partner - Creator II
Partner - Creator 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.

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

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

View solution in original post

3 Replies
consenit
Partner - Creator II
Partner - Creator II

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.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

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
Partner - Specialist III
Partner - Specialist III

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