Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
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
juan_patrick
Creator
Creator
Author

No, I have a variable in the expression so i must write the same in the dimension and didnt work.

the variable is:

$(myVar(Param1,Param2))

and inside do:

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

If i put this into the dimension :

=if( $(myVar(Param1,Param2)) <> 0, FINSEMANA)

FINSEMANA -> is the day that the data do a control cut.

the error:

Error in calculated dimension.

Not applicable

You forgot the "Aggr" function. Something like that:

=if( Aggr($(myVar(Param1,Param2)), FINSEMANA) <> 0, FINSEMANA)


Maybe it will need add more independed keys to "aggr" parameters, if they placed in the left of this dimension.

Gysbert_Wassenaar

The example you posted works with the modified expression. Your example does not contain a field CANNOT or a field DIM_GRUPO. If you need help with that you will have to post a qlikview document that accurately models your real document.


talk is cheap, supply exceeds demand