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: 
Luis_Gueerero13
Contributor II
Contributor II

Compare columns in a pivote table

Luis_Gueerero13_0-1622142085171.png

 In that pivot table i would like to be able to compare May and April to define if May ir greater/equal/less than Apr and be able to give it a specifir color, but I'd like to be able to change the months and keep it working

 

1 Reply
brunobertels
Master
Master

Hi 

here below an example 

add this mesure in the color expression panel of your mesure : 

 

if(before(column(1))>column(1),green(),LightRed())

so no matter how much Months is displayed (2 , 3 or more ) it will compare month column value with previous month column value and give it specified color depending of the result. 

adapt this mesure if you want an equal comparison by adding an if statement 

 

regards