Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
cpalbrecht
Creator
Creator

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.

5 Replies
Gysbert_Wassenaar

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
Creator
Creator
Author

Hey Gysbert,

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

BR

petter
Partner - Champion III
Partner - Champion III

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
Creator
Creator
Author

Thanks Petter, this is also working!

BR

petter
Partner - Champion III
Partner - Champion III

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