Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
juan_patrick
Contributor

Expression dinamic bkacground color

Hi, i have a pivot table with some dimensions and one expression; one of the dimensions is year-month.

I want to put a background color in the expressions using two colors, in the expression bakground color i put this:

=$(vColorGrillaAlternativo(ColumnNo()))

and the definition of the variable is:

SET vColorGrillaAlternativo = if(Odd($1),rgb(250,240,230),rgb(250,235,215));

The problem is that, for a month, i have no data for the expression so it repeat the same colour for background because for qlikview exists that column but dont show because have no data... ¿Any suggestions? Thanks!!

12 Replies
MVP & Luminary
MVP & Luminary

Re: Expression dinamic bkacground color

Can you post a document that demonstrates the problem?


talk is cheap, supply exceeds demand
juan_patrick
Contributor

Re: Expression dinamic bkacground color

I upload an excell with the example:

You can see the dates (weeks),  between the weeks 20/06/2014 and 04/07/2014 is missing the 27/06/2014 (its exists in the calendar, but there is no data for it in the expression)

So, if put the columnn number, qlikview returns:

20/06/2014 -> column 3

04/07/2014 -> column 5

Thats why qlikview repeat the bakcground color... the column 4 have no data and so it's hide

Thank you!

MVP & Luminary
MVP & Luminary

Re: Expression dinamic bkacground color

Let me rephrase that: Can you post a qlikview document that demonstrates the problem?


talk is cheap, supply exceeds demand
juan_patrick
Contributor

Re: Expression dinamic bkacground color

I uploaded an example!

MVP & Luminary
MVP & Luminary

Re: Expression dinamic bkacground color

Change the expression to =sum({<total={'*'}>}total) to eliminate the days without total values.


talk is cheap, supply exceeds demand
juan_patrick
Contributor

Re: Expression dinamic bkacground color

It didnt work.

I have a variable that contains:

AVG( {< $1 = {1}, DIM_GRUPO={'$2'} >} CANTTOTAL );

I added CANTTOTAL={'*'}


to the variable but still do the same.

Not applicable

Re: Expression dinamic bkacground color

Remove empty values at dimension level for [day]:

=If(Aggr(Sum([total]), [day]) <> 0, [day])

juan_patrick
Contributor

Re: Expression dinamic bkacground color

It doesnt work

Not applicable

Re: Expression dinamic bkacground color

Capture.PNG

Is this not correct?