Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

rperezlaso
New 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

Accepted Solutions
sureshqv
Esteemed Contributor III

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

4 Replies
sureshqv
Esteemed Contributor III

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

undergrinder
Valued Contributor II

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

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
New Contributor III

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

it works perfect, I needed to use TOTAL.

rperezlaso
New Contributor III

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

it works perfect, I needed to use TOTAL.

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

Community Browser