Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
JaimeSAC
Contributor
Contributor

Colors to the rows in a Vizlib Pivot Table

Hello,

I am using Vizlib Pivot table and I want to assign different colors to the rows in the table. 

One row black, one row red, one row black, one row red...

Please help me with your suggestions and approach.

Thanks in advance. 

Labels (3)
8 Replies
Almen
Creator II
Creator II

Under Presentation -> Column(Right Cells) you can set color for even and odd rows.

JaimeSAC
Contributor
Contributor
Author

Yes, but this option is only valid for the mesures (right cells).

Is not possible for the left cells (dimensions)

Almen
Creator II
Creator II

Try:

If(Odd(RowNo(TOTAL)=-1, red(),black())
JaimeSAC
Contributor
Contributor
Author

It's the same, this option only works for the mesures.

Because is a vizlib pivot table, this functions works in a native table or in a native pivot table...

Almen
Creator II
Creator II

 

Under Background include the expression.

KTIh5jyXmZUKNGud5x_05O0shZIF98AxdA.png

 

JaimeSAC
Contributor
Contributor
Author

Hello, thanks for your answer.

But  this option only return one color code, is not possible black - red - black - red

MichaelVizlib
Partner - Contributor
Partner - Contributor

I guess you are looking for something like this? You can do that with the Vizlib Finance Report. 

MichaelVizlib_0-1643959510013.png

 

vaisaali
Partner - Contributor II
Partner - Contributor II

Hey @JaimeSAC 
Using an expression like =concat(aggr(if(odd(FieldIndex('FieldName',FieldName)),FieldName),FieldName),',') in the dynamic styling for the dimension would help with background color in dimension(Example: Country being the dimension in attached app).

Attached example app.