Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi I have the following pivot table.
In which i want to differentiate each group of rows, may be by changing the background color of each set of rows alternatively.
Project Number | Project Name | Year - Month | Res | Bud | Sch | Qua |
E-2012-007 | A | 2012-08 | 1 | 1 | 1 | 1 |
2012-09 | 1 | 1 | 1 | 1 | ||
2012-10 | 1 | 1 | 1 | 1 | ||
2012-11 | 1 | 1 | 1 | 1 | ||
2012-12 | 1 | 1 | 1 | 1 | ||
2013-01 | 1 | 1 | 1 | 1 | ||
2013-02 | 3 | 3 | 3 | 2 | ||
2013-03 | 3 | 3 | 3 | 2 | ||
2013-04 | 3 | 3 | 3 | 2 | ||
E-N-2013-002 | B | 2012-10 | 1 | 1 | 1 | 1 |
2012-11 | 1 | 1 | 1 | 1 | ||
2012-12 | 1 | 1 | 1 | 1 | ||
2013-01 | 1 | 1 | 1 | 1 | ||
2013-02 | 1 | 1 | 1 | 1 | ||
2013-03 | 1 | 1 | 1 | 1 | ||
2013-04 | 1 | 1 | 1 | 1 | ||
G-2012-015 | C | 2012-08 | 2 | 2 | 2 | 3 |
2012-09 | 2 | 2 | 3 | 3 | ||
2012-10 | 2 | 2 | 3 | 2 | ||
2012-11 | 2 | 2 | 2 | 2 | ||
2012-12 | 2 | 2 | 2 | 2 | ||
2013-01 | 2 | 3 | 2 | 2 | ||
2013-02 | 2 | 3 | 2 | 2 | ||
2013-03 | 2 | 2 | 2 | 2 |
Desired O/p:
Can Any one suggest a solution?
Leo
In the dimension backgroung property set
=
if(odd(RowNo()),RGB(255,0,0), rgb(0,0,255))
hope it helps
Maybe something like this as expression for the background color for the dimensions and expressions:
if(even(FieldIndex('Project Number',[Project Number])),LightGray(200),Yellow(100))
Change Project Number with the name of your Project Number dimension.
Hi Gysbert,
I tried with the following expression, but it doesnt give the desired result,
if([Project Number] = Above([Project Number]), RGB(100,100,100), RGB(100,0,0))
The RowNo() returns the number of the row within a gruop of rows, but as soon as the group changes it resets to 1 again. Hence The above can be used if we want alternate coloring of rows in general, but for alternate coloring of grouped rows its not useful.
Here you go:
if(odd(Aggr(Nodistinct RowNo(), [Project Name])), RGB(100,100,100), RGB(100,0,0))
I used the expression in Background color of 'Sch' but its not working.
Have you tried my expression ... it works ....
=if(odd(RowNo()),RGB(255,0,0), rgb(0,0,255))
Alexandros17
It works for the alternate coloring of rows, but if you see the desired output, i want all the rows with same 'project Number' to be of same color, i.e. the color should change for groups of rows alternativly. please refer to the image for better understanding,
can you please share the sample if its working for you?
Thanks
Leo
See attached.
If that is not what you want, please upload alternative example.