Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
antonbb
Contributor
Contributor

Stripe every 1 row in pivot with multiple rows in dimensions

Hello!

I've try to make stripes every 1 row per Index (1st column) on pivot table.

I've try background color expression like suggested on this forum before.

=if(EVEN(aggr(RowNo(),Index)),rgb(230,230,230),white())

I works good when there is only one row per Index, but when there are more than 1 row per 1 index, only first line colored.

First, i thought that expression not works when count of Rowno() is greater than one, and to check it,  i've added this expression as dimension, and for my surprise expression works fine.

Dimension "row num" = aggr(RowNo(),Index)

Dimension "row" = EVEN(aggr(RowNo(),Index))

So it should work, but didn't ((

May be somebody suggest another solution.

Thank you.

tavle_stripes.JPG

1 Solution

Accepted Solutions
Kushal_Chawda

@antonbb  see the below

// Color expression for Index

=if(aggr(Mod(RowNo(total),2),Index)=0,LightGray())

// Color expression for Supplier and Expressions

=if(aggr(NODISTINCT Mod(RowNo(total),2),Index)=0,LightGray())

 

Annotation 2020-09-07 223937.png

View solution in original post

4 Replies
Kushal_Chawda

@antonbb  is your pivot table always fully expanded what if somebody collapse or expand individual cell of pivot?

Kushal_Chawda

@antonbb  try below expression in last row dimension and all expression of pivot table.

=if(mod(rowno(total),2)=1,LightGray())

Annotation 2020-09-06 220359.png

 

antonbb
Contributor
Contributor
Author

Hi Kush, thank you for your participate, but it is not i want, i need stripes every Index, not every single row.

Kushal_Chawda

@antonbb  see the below

// Color expression for Index

=if(aggr(Mod(RowNo(total),2),Index)=0,LightGray())

// Color expression for Supplier and Expressions

=if(aggr(NODISTINCT Mod(RowNo(total),2),Index)=0,LightGray())

 

Annotation 2020-09-07 223937.png