O'Reilly logo

QlikView Scripting by Matt Floyd

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Color alerts and calculated colors

Color alerts are also referred to as calculated colors, and they are useful for business users. Color alerts can be coded in the chart (or other) object and are commonly used to change the fonts or background colors of table cells, lines, and bars in charts. Calculated colors can also be used for navigation, to show users what the current tab is:

if(GetActiveSheetId()='Document\SH01',$(vColor1),$(vColor2)) 

The preceding code sets colors as follows: if the sheet (tab) is named SH01, the color of the text or object is the color as set in the vColor1 variable, and if the active sheet is not SH01, the text or object is the color as set in the variable vColor2.

if(GetActiveSheetId()='Document\SH01',Color (1), Color ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required