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: 
agomes1971
Specialist II
Specialist II

Conditional background colors with set analysis

Hi,

is it possible to format background colors with set analysis associated to a listbox ?

Please see attached.

Thanks in advance

1 Solution

Accepted Solutions
JonnyPoole
Former Employee
Former Employee

I think you are trying to get all year bars to be the same color depending on the selection in a list box.

I put in some extra code that in a chart will be more explicit that only 1 Area be evaluated. Use this on the 'background color' expression to color all bars the same:

=If( only( TOTAL aggr(only( TOTAL Area),Year)) = 'Litros', RGB(75, 172, 198),If( only( TOTAL aggr(only( total Area),Year)) = 'Outras Vendas', RGB(146, 208, 80), RGB(255, 192, 0)))

View solution in original post

3 Replies
anbu1984
Master III
Master III

Can you explain your requirement?

JonnyPoole
Former Employee
Former Employee

I think you are trying to get all year bars to be the same color depending on the selection in a list box.

I put in some extra code that in a chart will be more explicit that only 1 Area be evaluated. Use this on the 'background color' expression to color all bars the same:

=If( only( TOTAL aggr(only( TOTAL Area),Year)) = 'Litros', RGB(75, 172, 198),If( only( TOTAL aggr(only( total Area),Year)) = 'Outras Vendas', RGB(146, 208, 80), RGB(255, 192, 0)))

agomes1971
Specialist II
Specialist II
Author

It worked!!!