Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a chart where the background colors are changed for each of the expression , I have an expression something like if col1>col2 then yellow kind of , my problem is even total row is getting colored when the above condition is satisfied which I don't want.
I tried changing the background color by right click custom format cell , dimenstionality() , rowno () = 0 in the if statements .. nothing worked , how do I specify not to color total rows ...
Thanks
Script:
ExampleData:
Load
*
Inline
[
Country, IsActive,Qty
A,Y,5
A,Y,5
A,Y,5
B,N,3
C,N,1
];
Straight table chart with Country and IsActive as dimensions.
First expression is sum(qty).
Expression 2 - Dimensionality()
Expression 3 - Dimensionality(), but with Total Mode set to No Total.
Expression 4 - Dimensionality(). Totals turned back on, Background Color set to
=if(sum(Qty)>10,LightBlue(),LightGray())
Expression 5 - Dimensionality(). Totals turned back on, Background Color set to
=if(Dimensionality()=0,red(),if(sum(Qty)>10,LightBlue(),LightGray()))
If you want to show as grey instead, try:
=if(Dimensionality()=0,RGB(240,240,240),if(sum(Qty)>10,LightBlue(),LightGray()))
The Background Color is available by clicking the plus symbol next to the expression.
You should be able to detect the Total row in an if() with dimensionality(). Try adding a dimensionality() column to your chart to make sure you are testing the right value. Can you upload a sample?
-Rob
Script:
ExampleData:
Load
*
Inline
[
Country, IsActive,Qty
A,Y,5
A,Y,5
A,Y,5
B,N,3
C,N,1
];
Straight table chart with Country and IsActive as dimensions.
First expression is sum(qty).
Expression 2 - Dimensionality()
Expression 3 - Dimensionality(), but with Total Mode set to No Total.
Expression 4 - Dimensionality(). Totals turned back on, Background Color set to
=if(sum(Qty)>10,LightBlue(),LightGray())
Expression 5 - Dimensionality(). Totals turned back on, Background Color set to
=if(Dimensionality()=0,red(),if(sum(Qty)>10,LightBlue(),LightGray()))
If you want to show as grey instead, try:
=if(Dimensionality()=0,RGB(240,240,240),if(sum(Qty)>10,LightBlue(),LightGray()))
The Background Color is available by clicking the plus symbol next to the expression.