Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
adamwigley
Contributor
Contributor

Pivot Table Conditional Formatting

Hi,

I have created a pivot table which looks at sales by product groups and compares data over the past 3 x years.  this was a report created in Excel they wanted me to recreate in Qlikview.  All OK accept that in Excel, they use conditional formatting to look at the latest average selling price and see if it is larger or smaller than the previous year.  This previous year's average selling price is then compared to the year before that, each time highlighting red if lower or green if above the previous years price.

I have no idea if Qlikview can do this or where I would start.

A screenshot of what my Qlikview application looks like is below, I have manually highlighted how I would want to use conditional formatting to highlight the data (in red and green):

adamwigley_0-1601465279955.png

 

Any help would be much appreciated.

Thanks,

Adam

1 Solution

Accepted Solutions
Kushal_Chawda

@adamwigley  try below background color expression for [Avg Price]

 

=if(after(total Your_Avg_Price_expression)<= Your_Avg_Price_expression, green(),red())

 

View solution in original post

2 Replies
Kushal_Chawda

@adamwigley  try below background color expression for [Avg Price]

 

=if(after(total Your_Avg_Price_expression)<= Your_Avg_Price_expression, green(),red())

 

adamwigley
Contributor
Contributor
Author

Hi @Kushal_Chawda,

Thanks for responding - the solution you provided worked perfectly! I just tweaked it to stop it from colouring everything in as per below:

=If(After(TOTAL [Avg Price]) > [Avg Price], LightRed()
,If(After(TOTAL [Avg Price]) < [Avg Price], LightGreen()))

adamwigley_0-1601477936059.png

 

Thanks again,

Adam