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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
harithad95156
Contributor III
Contributor III

How to code background color expression in Qlik view for a pie chart in which the values are in relative mode (%)?

=if(sum({$<Year={'$(=max(Year))'}>}Sales_amount)>12.00,green(),red())=====while evaluating this expression showing only first color for all the values.

1 Solution

Accepted Solutions
MayilVahanan

Hi 

Try like this

=if(sum({$<Year={'$(=max(Year))'}>}Sales_amount) / sum({$<Year={'$(=max(Year))'}>}Total Sales_amount) >0.12,green(),red())

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

View solution in original post

2 Replies
MayilVahanan

Hi 

Try like this

=if(sum({$<Year={'$(=max(Year))'}>}Sales_amount) / sum({$<Year={'$(=max(Year))'}>}Total Sales_amount) >0.12,green(),red())

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

Thank you.