Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
NickP_DF
Creator II
Creator II

MyCell value

Hello guys,

I have a pivot table in whose cells I'd like to set various colors based on every cell value; since the cell value formula is very complex, is it possibile helping the reading by setting in the background properties a "cell value" (?) Qlikview function instead of repeating the cell value formula?  

Something like:

If (MyCellValue>10, LightRed(), If((MyCellValue>7, Yellow(), If((MyCellValue>2, LightBlue(),LightGreen())))  

Thank you so much.

N.

 

1 Solution

Accepted Solutions
Kushal_Chawda

@NickP_DF  Probably you can put your complex expression in variable (Without "=") and call that variable in background color expression like below

If ($(vMeasure)>10, LightRed(), If(($(vMeasure)>7, Yellow(), If(($(vMeasure)>2, LightBlue(),LightGreen())))  

where vMeasure is variable which stores the actual expression

View solution in original post

4 Replies
Kushal_Chawda

@NickP_DF  Probably you could do it in background color expression.. Something like below

If (YourActualExpression>10, LightRed(), If((YourActualExpression>7, Yellow(), If((YourActualExpression>2, LightBlue(),LightGreen())))  

NickP_DF
Creator II
Creator II
Author

Hi Kush,

thank you for the reply.

It's sure that your suggestion is correct, but my problem is that I don't like to explicit MyActualExpression because it's very long and complex, so the readability of the whole background color expression is compromised.

Besides that every change in the main formula should be made n-times (both in the cell expression and in the background color expressions).

All that should be very easier if I could get the value of my cell by meas of a Qlik funcion.

Thanks.

N.

Kushal_Chawda

@NickP_DF  Probably you can put your complex expression in variable (Without "=") and call that variable in background color expression like below

If ($(vMeasure)>10, LightRed(), If(($(vMeasure)>7, Yellow(), If(($(vMeasure)>2, LightBlue(),LightGreen())))  

where vMeasure is variable which stores the actual expression

NickP_DF
Creator II
Creator II
Author

ok, I was hoping there was a QlikView native function...

Thank you for this suggestion Kush, I'll work on it. 😉

N.