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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dynamic Bar color

I have a sales table which has 2 columns of total amount and selling agent. I also have a diagram which shows agents and their sum of selling.

I want to put an expression in background color which:

if the agent has sold more than average of all agents, makes the bar green. Otherwise, make it red (Regardless of active filter).

=If(Avg({1}[Selling Price])>> [Selling Price], RGB(128,255,0), RGB(255,0,0))

my changes the color when I change the current selection (filter).

any suggestion?

Labels (1)
11 Replies
mrossoit
Creator II
Creator II

I'm sorry but I don't understand.

You told "I want to see if Martin has sold more than average of all agents change the bar to green otherwise red".

Check out my sample please.

Not applicable
Author

In order to calculate avg sales you have to use the total qualifier as mentioned by Massimiliano Rosso