Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

straight table background color expression

Hi all,

Using Oleg's color document (good stuff) I can set the color of cell backgrounds but I need to set an expression instead (eg '=fieldvalue('Repair', 1) ') so that it is set at calculation time.

The example in the API guide that seemed like it should work doesnt (8.20) although the macro interpretor doesnt complain about the code:

set Graph = ActiveDocument.Sheets("Main").CreateBarChart

Graph.AddDimension "ProductType"

Graph.AddExpression "sum(Amount)"

Graph.AddBkgColorExpression "if(sum(Amount)>10,green(),red())",0

Any help appreciated.

Regards,

Gordon

1 Reply
Anonymous
Not applicable
Author

Have the same problem in Qlikview 9 with scatter plot

set chart=ActiveDocument.GetSheetObject("CH.volcano")
chart.RemoveExpression 1
chart.RemoveExpression 0
chart.AddExpression baseN& ".coef"
chart.AddExpression baseN& ".pval"
chart.AddBkgColorExpression "ColorMix1(xRDbefore080615.DEF.Ave/Max(TOTAL xRDbefore080615.DEF.Ave),white(),red())",0

the above code modifies a existing chart except changing point color. it adds the ColrMix.. expression as a new property of the first expression instead of adding it into the "Background Color" definition slot. Add the expression into "Background Color" definition slot manually works as supposed

Vlad