Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to highlight a cell

Hi,

As a new hand for Qlikview development, I have a question about highlighting a cell in straight table:

Say that I have a straight table, in which list all the sales' names (column 1), number of products they have sold (column 2) and corresponding revenue (column 3), as well as the average price (Column 3 / Column 2)in each row of the table; and how could I highlight a particular cell of column 'Average Price', for which value is less than the value of the total average price (Total Revenue / Total Number of Product Sold)?

Could anybody help me on this?

Many Thanks!

5 Replies
Not applicable
Author

Hi

use expression-expand expression-

here we have backgroundcolor,textcolor ,....

use text color in this

write the condition in text color

Not applicable
Author

There is a few ways you could do this

1) There is tab called visual cues in the properties of a straight or pivot table. In there you could enter an expression for cell highlighting.

2) The other way is if you click the expand icon for your expression under the expression tab, you could enter an expression for the backgound colour requirement.

In terms of the expression you could write

if( (sum(Revenue)/sum(ProductSold)) < (sum(TOTAL Revenue)/sum(TOTAL ProductSold)) ,

          red(),

          green())

as an example

cheers,

byron

Not applicable
Author

See attached hope it helps

Not applicable
Author

Thanks, Byron!

I find the place to put my code. However, it seems I can't quote the total values -- my tabel has a dimension of sales' name, and then, the fomular I use to retrieve the total values only get the result of each sales person respectively, then the value of both sides of the criterion you proposed above will a;ways be equal, and therefore never take effect. How could I work around it?

Not applicable
Author

Thanks!

However I failed to use your solution in my case, for I can't get the total values in the same way -- they are the total values of columns included under 'Expressions' instead of under 'Dimensions', which is shown in your sample file.