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

Red and green color percentage table

Hi

How can I create red color for negative % and green for positive % in following table? Can't seem to manage with proper formula under background formula expression. Thanks

The underlying formulas for V (Volume) and VpM (Volume previous month) are as follows:

V: Sum([#Quantity])

VpM: sum({<Month=, Date={">=$(=monthstart(max(Date),-1))<=$(=monthend(max(Date),-1))"}>} [#Quantity])

%CH: Sum([#Quantity]) / sum({<Month=, Date={">=$(=monthstart(max(Date),-1))<=$(=monthend(max(Date),-1))"}>} [#Quantity])-1

perc2.JPG

1 Reply
shraddha_g
Partner - Master III
Partner - Master III

try in background color:

if(

(Sum([#Quantity]) / sum({<Month=, Date={">=$(=monthstart(max(Date),-1))<=$(=monthend(max(Date),-1))"}>} [#Quantity])-1) <0,red(),green()

)