Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

cpalbrecht
Contributor

Highlight corresponding rows

Hi together,

I want to do the following. I have a table like this:

DateValue
Date1V1
Date1V2
Date1V3
Date2V4
Date2V5
Date3V6
Date4V7
Date4V8
Date4V9

And I want to display the table like this:

DateValue
Date1V1
Date1V2
Date1V3
Date2V4
Date2V5
Date3V6
Date3V7
Date3V8
Date4V9
Date5V10
Date5V11
Date6V12
Date6V13
Date6V14

I want to highlight alternately corresponding rows based on the date column.

Does anybody have an idea how to do this?

BR

Nachricht geändert durch Christoph Albrecht Updated table.

Tags (3)
5 Replies

Re: Highlight corresponding rows

Recent versions of Qlik Sense allow you to use expressions to set the background color of column cells. You can try something like =if(even(max(total <Date> aggr(RowNo(),Date))),LightGray(200),White())


talk is cheap, supply exceeds demand
cpalbrecht
Contributor

Re: Highlight corresponding rows

Hey Gysbert,

thanks for your answer. I updated the table. So the number of corresponding rows are not always even or odd.

BR

MVP
MVP

Re: Highlight corresponding rows

Then it could be done like this:

=Pick(FMod((Index(Concat(TOTAL DISTINCT Date,'||',Date),Date)-1)/12,2)+1,Green(50),White())


The number 12 in the expression above has to be adjusted to the number of characters in your date format. The ISO date format of YYYY-DD-MM plus the separators || gives 12.


This is a reliable way of determining even and odd groups of dates.

cpalbrecht
Contributor

Re: Highlight corresponding rows

Thanks Petter, this is also working!

BR

MVP
MVP

Re: Highlight corresponding rows

So did it solve your problem then? If so please mark the thread as answered and if you want helpful....

Community Browser