Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
vanderson009
Contributor III

Pivot Table Cell Color

Hi,

I have below data in pivot table,

Pivot.JPG

I want to change background color of cell based on condition if previous year sales is less than current then cell background is green else red.

Thanks,

Villyee

2 Replies
MVP
MVP

Re: Pivot Table Cell Color

  • Go to the properties dialog of the Pivot Chart.
  • Select the "Expressions" tab.
  • Click the + icon to the left of the Sum(Sales) expression.
  • Then select "Background Color" and in the "Definition" add the expression
    If( Before(Sum(Sales)) < Sum(Sales) OR ColumnNo()=1 , Green(100),Red(100))
  • Click OK.

2018-07-30 08_35_35-Edit Expression.png

mtucholski
Contributor

Re: Pivot Table Cell Color

if(before(sum(Sale))<sum(Sale),lightgreen(),lightred())