Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
petervdb
Contributor
Contributor

Green Red coloring expression

Hi All,

Pretty New to Qlik Sense:

I created a scatter plot, all data is from the same table, and my dimension is the Sales Rep

I want to highlight in green when Sales Reps achieved above targets in green and in red when below. The following formula does not work though, everything is red... (and should not, by the way)

if(Sum([Actual Sales]) - Sum([Sales Targets])>0, rgb(50,205,50),rgb(255,0,0))

Thanks

2 Replies
aunahsan
Partner - Contributor III
Partner - Contributor III

Hi Peter, where are you using your expression for colours?, i cant see why this wouldn't work.

in Qlik sense you can go to appearance > Colors and legends > by expression (from drop down), this is where you would enter that expression.

petervdb
Contributor
Contributor
Author

Thank you for confirming syntax was good. I actually just realized I was using the wrong field (very similar name to the one I needed).

Now looks fancy