Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
rperezlaso
Contributor III
Contributor III

How to color the field, when the previous value is the same?

Hi ,

i have a problem with the coloring the field when the previous field value is the same.

ex:

field 1

---------

a123 -------> i need to add a background in this field

a123

b123

b321

c222 -------> i need to add a background in this field

c222

If possible, I need it in the expression.

thanks

1 Solution
4 Replies
undergrinder
Specialist II
Specialist II

Hi,

I think the function below will help you

https://help.qlik.com/en-US/sense/June2018/Subsystems/Hub/Content/ChartFunctions/InterRecordFunction...

"Below() evaluates an expression at a row below the current row within a column segment in a table"


=if(dim=below(dim,1), backgroundColor, noBackgroundColor)



rperezlaso
Contributor III
Contributor III
Author

it works perfect, I needed to use TOTAL.

rperezlaso
Contributor III
Contributor III
Author

it works perfect, I needed to use TOTAL.

The expression is : =if( dim = below(TOTAL dim), backgroundColor, noBackgroundColor)