Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to make stripes every 1 row in Pivot Tabel?

How to make stripes every 1 row in Pivot Tabel?

May be someone know this code.

Thanks

11 Replies
Jason_Michaelides
Luminary Alumni
Luminary Alumni

I can't check this right now but isn't that an option in the style or presentation tab? It's there on straight tables for sure.

Hope this helps,

Jason

v_iyyappan
Specialist
Specialist

Hi,

     Cau u attach sample image for your requirment?

Iyyappan

Jason_Michaelides
Luminary Alumni
Luminary Alumni

Looks like I was wrong and that option isn't available for pivot tables.  However, expand the expression, select the background and in the definition box type:

=IF(Even(RowNo()),LightGray(),White())

Hope this helps,

Jason

Not applicable
Author

This code can't work properly. May be someone can share another result code?

Not applicable
Author

Hi Danny,

You'll need to use the AGGR() function is order to get the correct result in the pivot table. The field to be used in the formula is (usualy) the first column, depending on how you want the striping...

Try below code.

// colors rows - use calculation on 'Background'

// below formula gives at product_code level each row a different color: grey / white

IF(ODD(AGGR(NODISTINCT ROWNO(TOTAL),Product_Code)),WHITE(),

IF(EVEN(AGGR(NODISTINCT ROWNO(TOTAL),Product_Code)),LIGHTGRAY()))

Hope this works!

Regards, Anne

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this expression as background expression

=IF(Even(RowNo(TOTAL)),LightGray(),White())

Check attached file for solution.  I applied this expression for both dimensions and expression.

Regards,

Jagan.

Not applicable
Author

Thanks for this expression - is there an enhancement whereby it could be made to colour null/zero total values.  Currently it is not colouring these.

Not applicable
Author

Hi Jagan,

Thanks for sharing the above file. I have a concern here:

What if I drag the month_name as columns. Currently they are acting as rows for each year.

Then how will i be able to have alternate color patterns?

jagan
Luminary Alumni
Luminary Alumni

Hi,

I didn't get you, can you come up with an example and expected output.

Regards,

Jagan.