Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
alisonpwallis
Creator
Creator

Conditional Formatting - top two values

Hi

I have a chart where I need the top two percentages for each year to be highlighted (either by background colour or text, it doesn't matter). The data relates to particular categories and I want to know which categories have the highest percentage each time. I have tried conditional formatting the background colour and using visual cues but neither of them seem to work. I also don't know how to highlight the max value and the one below.


Can anyone help out?


I've attached a sample

thanks

Alison

1 Solution

Accepted Solutions
morganaaron
Specialist
Specialist

Hi Alison,

Try inserting:

If(Rank(Count ({$ <[EffectiveTerm]={"201314","201213","201415"}>}[Current ID])/Count (TOTAL<[EffectiveTerm]>[Current ID]))<=2, LightGreen())

in the "Background Color" option for your expression. Swap out LightGreen() for whatever RGB() or Color() value you wanted.

View solution in original post

3 Replies
morganaaron
Specialist
Specialist

Hi Alison,

Try inserting:

If(Rank(Count ({$ <[EffectiveTerm]={"201314","201213","201415"}>}[Current ID])/Count (TOTAL<[EffectiveTerm]>[Current ID]))<=2, LightGreen())

in the "Background Color" option for your expression. Swap out LightGreen() for whatever RGB() or Color() value you wanted.

alisonpwallis
Creator
Creator
Author

That's great! Thank you so much.

Alison

Not applicable

Please find attached file.

Hope it helps you.