Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
GregBrooks1
Employee
Employee

background color in trellis container

Can a background color be set for cells in a trellis container using colormix2?  The charts are histograms and I would like to show deviation from the mean as one of two colors, with white being close to or at the mean.

If it can be done, I would assume it would be in the Master Visualization under Presentation, Styling / General / Background Color / By Expression, but not sure of the correct expression.  For regular tables it's something like:

=colormix2(
(rank(TOTAL column(1))/(NoOfColumns(TOTAL)/2))-1,
rgb(20,20,20),
rgb(100,100,100),
rgb(200,200,200)
)

But this does not work for Trellis Containers.

GregBrooks1_0-1713230409037.png

 

Labels (1)
2 Replies
mpc
Partner - Specialist
Partner - Specialist

Hi,

Column and NoOfColumn are Straight Table functions only:

https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterReco...

Regards

From MPC (and Next Decision) with love
GregMBrooks
Employee
Employee

I tried using Colormix1 and can get a color to show across the Trellis cells, but the color is the same for all cells based on the calculated percent of saturation overall.  I cannot get the individual cells to color according to their own individual percent of saturation.  The overall color saturation changes based on the measure I select, but again, not in the individual cells.

Here is the code I am using.  I select a measure to display (vMeasureName).  I check to make sure the value is greater than 0.  I have also turned on Advanced mode for the Trellis container and use vDimSetFull.

=colormix1(
AVG(AGGR(
(max(if($(vDimSetFull) [$(vMeasureName)]>0,($(vDimSetFull) [$(vMeasureName)])))-
avg(if($(vDimSetFull) [$(vMeasureName)]>0,($(vDimSetFull) [$(vMeasureName)]))))
/
(max({$<RVarName2 = {'$(vMeasureName)'}>} Upper_SNI)-
max({$<RVarName2 = {'$(vMeasureName)'}>} Nominal_SNI))
,[32CELL]))
,rgb(255,255,255),LightCyan())

 

Any help appreciated.