Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pivot Table cell background color

Hi all,

I have a Pivot Table that sums sales for each product during the last full 365 days.

My Dimensions are:

Product Class  (like autos, shirts, pants)

Product Name (like race car, tank top, grungy jeans)

CalendarMonthYear May-2013, June-2013 .. . .  Apr - 2014)

My Expression is:

SUM({<Product_ProductName = >}Order_Counter)

What I want to do is change the background color of each sell to red if this months sales are lower than last months sales and green if the are greater.

Thank you all for looking and your help.

1 Solution

Accepted Solutions
Not applicable
Author

I think you got me on the right track, but since I want to evaluate the sales from last month compared to this month in the diminsion, I think it would be correct to use Before and not below.


If( SUM({<Product_ProductName = >}Order_Counter) <

    before(TOTAL SUM({<Product_ProductName = >}Order_Counter) ) , Red( ) , Green( ))

View solution in original post

4 Replies
Not applicable
Author

Click the plus sign next to the expression, Click on the background color and add the expression

VLASTMONTH - Variable which holds last month.

if(count(SUM({<Product_ProductName = >}Order_Counter)) > SUM({<Product_ProductName = , Month = 'VLASTMONTH'>}Order_Counter) , Red(), green())

Not applicable
Author

Thanks for the reply, but I am not using a variable.

I would have to base this off the Dimension CalendarMonthYear

So this is kinda how it looks currently:

ProductAug-2013Dec-2013
123423452256
its_anandrjs

In the expression by click on + in background color write

If( SUM({<Product_ProductName = >}Order_Counter) <

    Below(TOTAL SUM({<Product_ProductName = >}Order_Counter) ) , Red( ) , Green( ))

Not applicable
Author

I think you got me on the right track, but since I want to evaluate the sales from last month compared to this month in the diminsion, I think it would be correct to use Before and not below.


If( SUM({<Product_ProductName = >}Order_Counter) <

    before(TOTAL SUM({<Product_ProductName = >}Order_Counter) ) , Red( ) , Green( ))