Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Best use of variables in expressions

Which is the best and most efficient approach to using a variable to control colors using the RGB() function:

1) =$(vBlack)

where vBlack = RGB(0,0,0)

or

2) =RGB(vCaptionBgRed, vCaptionBgGreen, vCaptionBgBlue)

where the RGB values are individual variables.

Tags (1)
2 Replies
Not applicable

Best use of variables in expressions

I think first way is easy to maintain. You just have to change the values for one variable.

Thanks

Not applicable

Best use of variables in expressions

I've had good luck with using color variables named for their purpose (like vColorChart01, or vColorCaptionActive), and then loading them from an Excel file.

This way, you have easy universal control over your colors, in better context.

Oh, and store them as RGB(xxx,xxx,xxx) values in the Excel file. You could also keep the values in separate columns and have Excel concatenate them into the second column (first is the label), as RGB(xxx,xxx,xxx).

-DJ

Community Browser