# Qlik Sense App Development

Not applicable

## Highlight a value in a table, What expression would be best?

Thank you Everyone!

Last weekend I've been fighting with my expression to highlight the maximum Quantity amount as showed here:

I would like the Brazil Quantity 3,358,230 to be in green.

I used different expressions:

=if((Max(Quantity), Quantity rgb(0,255,0), Quantity)

=IF(Sum( {\$<Quantity={"<=\$(=Max(Quantity))"}>} Quantity),rgb(0,255,0)

=firstsortedvalue( Quantity, -Aggr(Max([Quantity]),Quantity,rgb(0,255,0)))

Unfortunately none is working! Again maybe my expressions are totally wrong.

1 Solution

Accepted Solutions
Esteemed Contributor III

## Re: Highlight a value in a table, What expression would be best?

I assume you need help with the background color (or maybe text color) expression for Quantity column.  Try this:

if(Quantity=max(total Quantity, rgb(0,255,0)))

4 Replies
Esteemed Contributor III

## Re: Highlight a value in a table, What expression would be best?

I assume you need help with the background color (or maybe text color) expression for Quantity column.  Try this:

if(Quantity=max(total Quantity, rgb(0,255,0)))

Not applicable

## Re: Highlight a value in a table, What expression would be best?

Thanks Michael!

Yes, for either the text or the Background color.

I'm going to try this out tonight.

Thanks again!

Esteemed Contributor III

## Re: Highlight a value in a table, What expression would be best?

This rgb looks too light for text.  Well, you'll figure out.

Employee

## Re: Highlight a value in a table, What expression would be best?

Are you first summing the quantities from multiple records in your data model to get a by country sum ?

If that is the case I'm wondering if you need aggr() here to first sum() and then get the max of the sums.

if(   sum(Quantity)=max(total aggr( sum(Quantity), pays) ), rgb(0,255,0)))