Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for
Did you mean:
Contributor III

## Mark only highest value under a limit - background color expression

Hi,

Is it possible to mark the highest number under a limit? (background color expression)

Lets say you have a bunch of different numbers:

500,

452,

2,

35,

816

How do I mark the highest number under ley say 480 (=452) without marking all the numbers under the “limit” ?

I have tried some stuff with the max and maxstring, but no luck when it’s under a limit.

If(Test<='480',LightBlue(),)     //<-- Marks all equal to or under

if(max(Test)<= '480',LightBlue(),)      //<--do not work – makes sense since the max value is not under

If(Test<='480',if(Test=max(Test),LightBlue(),),)      //<--Do not work

if(Test< =max(If(Test <='480', Test,)),LightBlue(),)      //<--Do not work

Labels (4)

• ### MaxString()

14 Replies
Creator

Try this

If(Rank(YourExpression) = 1,Blue(), Green())

While we teach we learn
Contributor III
Author

Thats pretty cool 🙂 Marks all rows above one color and equal to or under another color.

However in this case I would like to only mark one row (max string under the limit).

Creator

would this work

If(Rank(YourExpression) = 1,Blue())

While we teach we learn
Contributor III
Author

I guess I'm using it the wrong way.

How would you make it work, to just highlight one (highest within the limit)? Could you give me an example?

Right now I'm marking all - either above or under the limit.

MVP

``If(Max(TOTAL {<Test = {"<480"}>} Test) = Test, LightBlue())``

Contributor III
Author

Maybe... 🙂

I get red lines under the part starting with {"<480"}

If(Max(TOTAL {<Test = {"<480"}>} Test) = Test, LightBlue())

MVP

I hope you have used the correct field name as I think Test is just a placeholder? There are three Tests that need to be replaced by your field name....

Contributor III
Author

You are right. It's just a name since I cannot share any of my real data.  I did change it to the right one. It is "accepted" right before the {"<480"} part..  and yes all 3 parts was changed to the correct name 🙂

Also tried to create a new with the actual name "Test" (just to be sure) = still the same red lines.

However - it is the name (or label if you will) of the expression, and not a table field name. Do not know if that changes anything.

This it what It looks like in the expression:

Would think it to be some syntax-thing. 🤔

MVP

Yes, it def. does. You cannot use expression labels... you need to use the fields created in the script to do this.

Community Browser