Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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:
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:
Using the Properties box, I set the color using the calculated base color box:
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:
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.
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)
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?
Yes.
And same for Dimensions (for the table, not pie)
Awesome. Looks perfect. Thank you!