Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Ribeiro
Specialist
Specialist

I'm not able to use If with colors in variables.

I need to place the colors according to the color scheme. But with variables.

=if(Column(1) <= 300,RGB(255,128,0),
if(Column(1) >= 301 and Column(1) <= 352,RGB(255,255,0),
if(Column(1) >= 353,RGB(0,185,0),RGB(255,255,255))))

No Variables:  Works in Color 😀

sem variaveis.jpg

vMedia: num(sum(Valor)/Count(DISTINCT fun),' #.##0,00')

vMedia+10: num((sum(Valor) / Count(DISTINCT fun) * vValor / 100) + (sum(Valor) / Count(DISTINCT fun)),' #.##0,00')

vMedia-10:num((-sum(Valor) / Count(DISTINCT fun)) * vValor / 100) - num(-(sum(Valor) / Count(DISTINCT fun)),'#.##0,00')

Set Analysis:

=if(Column(1) <= $(vMedia-10),RGB(255,128,0),
if(Column(1) >= $(vMedia) and Column(1) <= $(vMedia+10),RGB(255,255,0),
if(Column(1) >= $(vMedia+10),RGB(0,185,0),RGB(255,255,255))))

With Variables😂

2020-09-11_08-09-30.jpg

2020-09-11_08-12-15.jpg

Neves
1 Solution

Accepted Solutions
Kushal_Chawda

@Ribeiro  see the attached.  You may need to change the conditions based on your variable values because what you have entered manually is different than what comes from variable.

 

View solution in original post

2 Replies
Kushal_Chawda

@Ribeiro  see the attached.  You may need to change the conditions based on your variable values because what you have entered manually is different than what comes from variable.

 

Ribeiro
Specialist
Specialist
Author

😀😁Thank you very much. 

Neves