Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to format a Column Chart to change colors based on a goal

I am trying to fingure out how to have individual columns in a chart change be green or red depending on if the daily goal was surpassed or not.

For example if the target was passed for the day I want the column to be Green. If the target was missed then I want the column to be Red.

Is this possible in QV? How would I do it?

Tim

5 Replies
MayilVahanan

Hi

     Where you are using? Which chart?

     Try like this,

     if straight table means, use in expression tab -> '+' sign -> background color

     =if([target was passed for the day expression], green(), red())

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Thanks for the quick response. I do have one question though, where would I put the second option below, in the expression builder?

MayilVahanan

Hi

     Check the attached image.. You can give in text color or background color

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Can you open the Expression box. I am having a hard time reading the expression that you are writing

Thanks

MayilVahanan

HI

     In the expression box, use expression something like this..

    

  =if([target was passed for the day expression], green(), red()) . I posted a sample image..

     Can you post a sample file?

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.