Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

How to highlight Background color across a bunch of expressions

I have two dimension and 8 expressions in a pivot table.

I am trying to highlight the background color for the expression that has the highest value of all the expressions on each row for that dimension value (TestName).  So, for Sunspider, it would be Exp7, I would want a blue background for that best one.  I am not sure how to consider the 8 expressions columns on a row in the code as a set.

Anybody have any ideas how to do that? 

accrossRowsQlikview.PNG

1 Solution

Accepted Solutions
Not applicable

Re: How to highlight Background color across a bunch of expressions

If you allow the pivot table to create the expressions, as opposed to manullay creating the expressions in your example, you can use the Aggr function to find the maximum across your dimension, and then compare that to your results within the Background Color of your expression.

If( Sum(Results) = Aggr(NODISTINCT Max(Results),TestName), LightBlue() )

I've attached your qvw example to show this.

15 Replies
rahulgupta
Contributor III

How to highlight Background color across a bunch of expressions

Hey Hi,

As you are using pivot table, goto the exression tab nad click the '+' sign at the start of each Expression, there you will find the background color option >> write an exression over there(eg if(sum(Sales)>10000,green(),red())

In case of straight table, use Visual Cues.

Hope this helps

Regards

Re: How to highlight Background color across a bunch of expressions

Hi,

See the attached sample file there you find the code for Background and text color also. Just click on + sign on front of the expression and you find several option select Background Color to change back color,to change text color select Text Color and write code there.

Regards

Anand

Not applicable

How to highlight Background color across a bunch of expressions

Thanks for the input.  setting the background color is understood, how  to compare accross expressions is the question I have.  

How to highlight Background color across a bunch of expressions

Hi,

In this case you need to create a different variables for the expression and need to check the condotion that you see on the Background option from there same like check the condition and give color to the condition. Do you have any sample if so please provide it goes so easy.

Regards,

Anand

Not applicable

Re: How to highlight Background color across a bunch of expressions

Here is Qlikview file that, one chart. Trying to color background light blue for the best in class on each row.

Not applicable

How to highlight Background color across a bunch of expressions

Are you suggesting turn each expression formula into a variable and then do an:

if (   NumMax(  $(vExpr1), $(vExpr2), $(vExpr3),... = $vExpr1  ), rgb(255,0,.0)  )  in the Background? 

Not applicable

Re: How to highlight Background color across a bunch of expressions

If you allow the pivot table to create the expressions, as opposed to manullay creating the expressions in your example, you can use the Aggr function to find the maximum across your dimension, and then compare that to your results within the Background Color of your expression.

If( Sum(Results) = Aggr(NODISTINCT Max(Results),TestName), LightBlue() )

I've attached your qvw example to show this.

Not applicable

Re: How to highlight Background color across a bunch of expressions

Seems that would be perfect… Missed a point somewhere, did not know we could put dimension across the top on the horizontal… Not sure how to do that yet, how did you do it?

Not applicable

Re: How to highlight Background color across a bunch of expressions

Think I figured it out, select, get the hand and do a drag and drop of sorts…. Hmmm

Community Browser