Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Highlighted
dominikkeller
New Contributor II

Dynamic Background in Totals on Straight Table

Hey Qlikkers,

i tried to build a Straight Table but the Totals Row kills me. For each Column i have an Expression how to format the Cell, but the Total Row does not really care about that. Any ideas?

Bildschirmfoto 2019-05-21 um 12.18.27.png

 

 

2 Solutions

Accepted Solutions
Partner
Partner

Re: Dynamic Background in Totals on Straight Table

Hi!

Your totals are an average so you can not assign a color from a condition in Sum(Betriebscheck.Data). Try something like:

if(Dimensionality() = 0,
	if(avg(Betriebscheck.Data)>0.9, green(255),
	if(avg(Betriebscheck.Data)>0.8, Yellow(255),
	if(avg(Betriebscheck.Data)>0.1, rgb(255,80,11))))
,
	if(sum(Betriebscheck.Data)>0.9,green(255),
	if(sum(Betriebscheck.Data)>0.8 ,Yellow(255),
	if(sum(Betriebscheck.Data)>0.1, rgb(255,80,11))))
)

if dimensionality()=0 then it is a "total" cell. Thus, I choose a color depending on cell type: I use AVG for total cells and SUM for regular ones.

Regards,

Jaime.

Partner
Partner

Re: Dynamic Background in Totals on Straight Table

for showing the value in total you are using average of rows

for the background color you are only using sum(Betriebscheck_Data)! BUT the sum(Betriebscheck_Data) for total is 3,497!!! and so green is the correct color
You may use avg instead of sum for the background color.
Or you define the colors in Visual Cues for the field Betriebscheck

5 Replies
Partner
Partner

Re: Dynamic Background in Totals on Straight Table

Hi!

Could you share a sample of data so we can test?

Jaime

dominikkeller
New Contributor II

Re: Dynamic Background in Totals on Straight Table

Hey Jaime,

here is a Test Version.

Thank you

Partner
Partner

Re: Dynamic Background in Totals on Straight Table

Hi!

Your totals are an average so you can not assign a color from a condition in Sum(Betriebscheck.Data). Try something like:

if(Dimensionality() = 0,
	if(avg(Betriebscheck.Data)>0.9, green(255),
	if(avg(Betriebscheck.Data)>0.8, Yellow(255),
	if(avg(Betriebscheck.Data)>0.1, rgb(255,80,11))))
,
	if(sum(Betriebscheck.Data)>0.9,green(255),
	if(sum(Betriebscheck.Data)>0.8 ,Yellow(255),
	if(sum(Betriebscheck.Data)>0.1, rgb(255,80,11))))
)

if dimensionality()=0 then it is a "total" cell. Thus, I choose a color depending on cell type: I use AVG for total cells and SUM for regular ones.

Regards,

Jaime.

Partner
Partner

Re: Dynamic Background in Totals on Straight Table

for showing the value in total you are using average of rows

for the background color you are only using sum(Betriebscheck_Data)! BUT the sum(Betriebscheck_Data) for total is 3,497!!! and so green is the correct color
You may use avg instead of sum for the background color.
Or you define the colors in Visual Cues for the field Betriebscheck

dominikkeller
New Contributor II

Re: Dynamic Background in Totals on Straight Table

Work's perfect. Thank you