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

Calculated Colors from Loaded Table

I am comparing the financial results of three competing internal divisions - A, B, & C. In my primary table, I load the financial results (to simplify, with fields Division and Revenue) along with a secondary table that has Division & the red, green, & blue color components for each division's company-approved color palette:

error loading image

I'm trying to make a simple pie chart that visually compares the divisions, with each divison's piece of the pie chart being that division's color.

The proportions are correct, but the colors are the standard qv colors:

error loading image

Using the Properties box, I set the color using the calculated base color box:

error loading image

The expression

RGB([Entity RGB Red], [Entity RGB Green], [Entity RGB Blue])

returns all black. The expression

RGB(Aggr($([Entity RGB Red])), Aggr($([Entity RGB Green])), Aggr($([Entity RGB Blue])))



makes no change to the color palette (returns the default colors)

If I hard code the RGB numbers into the formula, it returns the correct color. I would do it this way, but Division A won't always be the largest division, and I can't have Division C showing up with A's color if I distribute this to sales leaders.

A straight table in the same sheet shows the division associations correctly:

error loading image

so I can't figure out why the colors aren't correct.

I would really appreciate some help figuring out how to use the calculated color option correctly.

4 Replies
Anonymous
Not applicable
Author

I think all you need to do us to use the next expression in Entity Dimension and in all Expressions, in color atrribute expressions:
rgb(Red,Green, Blue)

Not applicable
Author

Michael,

Thanks for taking the time to help me out here.

I have to admit, I'm still pretty new to manipulating graphs in qlikview, so I'm not quite sure what you mean by "use the next expression in Entity Dimension and in all Expressions."

Do you mean in the "Background Color" attribute under the Expression in the Expressions tab?

Anonymous
Not applicable
Author

Yes.
And same for Dimensions (for the table, not pie)

Not applicable
Author

Awesome. Looks perfect. Thank you!