Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
juan_patrick
Creator
Creator

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
Gysbert_Wassenaar

Can you post a document that demonstrates the problem?


talk is cheap, supply exceeds demand
juan_patrick
Creator
Creator
Author

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!

Gysbert_Wassenaar

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


talk is cheap, supply exceeds demand
juan_patrick
Creator
Creator
Author

I uploaded an example!

Gysbert_Wassenaar

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


talk is cheap, supply exceeds demand
juan_patrick
Creator
Creator
Author

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

Remove empty values at dimension level for [day]:

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

juan_patrick
Creator
Creator
Author

It doesnt work

Not applicable

Capture.PNG

Is this not correct?