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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Background color of the straight table cell change according to Month

Hi there,

A question about the color change of the straight table cell. I want to make it yellow or green, depends on whether the corresponding month is an odd or even month. Therefore I used the following formula in the Visual Cues:

if(mod(Month/2)=0,white(),yellow())

However it only shows all white or yellow, not as our expectation...can anyone point out what I have made wrong? Thanks in advance!

5 Replies
spsrk_84
Creator III
Creator III

Hi,

Thelogic is correct but whether the Month dimension contains 1,2,3.......12 or Jan ,feb,.....dec?

if it is jan --Dec then monthnum fun to get the monthnumber and then apply the logic.

Rgds,

ajay

johnw
Champion III
Champion III

You need a comma instead of a slash, green() instead of white(), and since 0 is false and 1 true:

if(mod(Month,2),yellow(),green())

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP


williamcheung wrote:I used the following formula in the Visual Cues


Visual Cues is not the correct property to set for this effect. You should put the (correct) color expression in the "Text Color" or "Background COlor" property of the expression. Access these properties by clicking the + sign next to the expression in the Expression pane. John's attachement shows an example of this.

-Rob

Not applicable
Author

It's really working, thanks all!

Not applicable
Author

Very cool! Nice presentation tool