Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Now accepting applications for the Qlik Luminary and Partner Ambassador Programs: Apply by July 6!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Fixed colors on bars in a chart

Hi!

I have a bar chart in which I want to control the colors on the bars based on the dimensional value.

I have a condition on the background of the expression, it works fine.

But I have an issue. The dimension is a cyclic group and I only want the specific colors on some of the levels.

Example. my cyclic group is a hieracy. Industry-> Customer

I want Industry A to be red and Industry B to be green. But when I switch to customer in the cyclic group I want to use the colors from the colors tab in properties since I don't want all Industry A customers to have the same color. I want all customers to have different colors and not the color of the Industry it belongs to.

Labels (1)
2 Replies
Not applicable
Author

Hi Zandra,

try using the function getcurrentfield(myGroup), it should be something like this:

if(getcurrentfield(<the name of your group here>)='Industry', if(Industry=A,green(),red()))

hope this helps

Regards!!

Not applicable
Author

That works! Perfect! Tanks a lot!!