Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
vanderson009
Creator III
Creator 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

Labels (1)
2 Replies
petter
Partner - Champion III
Partner - Champion III

  • 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
Creator
Creator

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