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

Pivot Total Row - Colour

Hi,

I am conditionally formatting the background colour of a pivot table :

pivot_totals_col.PNG

Is it possible not to colour the 'Totals' rows ?

Thanks for any help

1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

if(rowno() = 0 , lightgray(), if(ColumnNo()=0, lightgray(),

if(sum(final_total)>=8, rgb(255,0,0),

if(sum(final_total)<3.0, rgb(187,255,187),

if(sum(final_total)>=3.0 and sum(final_total)<=5.0, rgb(255,255,157),

if(sum(final_total)>=6.0 and sum(final_total)<=8.0, rgb(255,128,128)))))

))

removed an extra column at end

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

9 Replies
vinieme12
Champion III
Champion III

Are you using an expression to calculate the background? please post

https://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Custom_Format_Cell_dialog.htm

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Not applicable
Author

Hi yes I am,

if(sum(final_total)>=8, rgb(255,0,0),

if(sum(final_total)<3.0, rgb(187,255,187),

if(sum(final_total)>=3.0 and sum(final_total)<=5.0, rgb(255,255,157),

if(sum(final_total)>=6.0 and sum(final_total)<=8.0, rgb(255,128,128)))))

Thanks,

c_gilbert
Creator II
Creator II

Try this instead:

=if(RowNo()<>0 and ColumnNo()<>0,

if(sum(final_total)>=8, rgb(255,0,0),

if(sum(final_total)<3.0, rgb(187,255,187),

if(sum(final_total)>=3.0 and sum(final_total)<=5.0, rgb(255,255,157),

if(sum(final_total)>=6.0 and sum(final_total)<=8.0, rgb(255,128,128)))))

)

vinieme12
Champion III
Champion III

Try

if(rowno() <> 0 ,

if(sum(final_total)>=8, rgb(255,0,0),

if(sum(final_total)<3.0, rgb(187,255,187),

if(sum(final_total)>=3.0 and sum(final_total)<=5.0, rgb(255,255,157),

if(sum(final_total)>=6.0 and sum(final_total)<=8.0, rgb(255,128,128)))))

,rgb(210,210,210))  // Gray for TotalRow

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Not applicable
Author

Hello ,

Both solutions work but only for the horizontal 'Hour' Totals at the bottom.  Is there a solution for the Daily totals on the right hand side?

Many thanks,

vinieme12
Champion III
Champion III

if(rowno() <> 0  OR ColumnNo()<>0,

if(sum(final_total)>=8, rgb(255,0,0),

if(sum(final_total)<3.0, rgb(187,255,187),

if(sum(final_total)>=3.0 and sum(final_total)<=5.0, rgb(255,255,157),

if(sum(final_total)>=6.0 and sum(final_total)<=8.0, rgb(255,128,128)))))

,rgb(210,210,210))  // Gray for TotalRow

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Not applicable
Author

Hi Vineeth,

Thanks for your prompt reply! That only seems to alter the bottom right corner cell  ...

Capture1223.PNG

Any ideas?

vinieme12
Champion III
Champion III

if(rowno() = 0 , lightgray(), if(ColumnNo()=0, lightgray(),

if(sum(final_total)>=8, rgb(255,0,0),

if(sum(final_total)<3.0, rgb(187,255,187),

if(sum(final_total)>=3.0 and sum(final_total)<=5.0, rgb(255,255,157),

if(sum(final_total)>=6.0 and sum(final_total)<=8.0, rgb(255,128,128)))))

))

removed an extra column at end

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Not applicable
Author

perfect - many many thanks!