Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How to write an expression in QlikView for multiple if.
If(budget=1,back ground color green)if (budget=2,background color orange,if budget=3,back ground color red)
pls suggest
Dear Ipsita,
There are 3re ways to apply background colors,
1st Way: Please note, there is no orange color function into QlikView. Therefore, Orange color will not work and you have to use color code such as, mentioned in 2nd Way:
=If (budget = 1, Green(),
If (budget = 2, Orange(),
If (budget = 3, Red())))
2nd Way:
=If (budget = 1, RGB(0,255,0),
If (budget = 2, RGB(255,153,0),
If (budget = 3, RGB(255,0,0))))
3rd Way: (Best way for big projects)
Create variables for each color and use them where you need, such as given below:
Settings > Variable Overview > Add > variableName ( ex. vColorGreen ) > Select Variable > Give value into variable Definition ( ex. RGB(0,255,0) )
vColorGreen = RGB(0,255,0)
vColorOrange = RGB(255,153,0)
vColorRed = RGB(255,0,0)
=If (budget = 1, $(vColorGreen),
If (budget = 2, $(vColorOrange),
If (budget = 3, $(vColorRed))))
Kind regards,
Ishfaque Ahmed
if(budget=1, green,
if(budget =2, orange,
if(budget=3, red)))
if(budget=1, back ground color green, if (budget=2, background color orange, if (budget=3,back ground color red)))
=if(budget=1, green(), if(budget =2, rgb(255,128,64),if(budget=3, red())))
Feeling Qlikngry?
Hi ipsita,
worked example attached!
HTH - Andy
Dear Ipsita,
There are 3re ways to apply background colors,
1st Way: Please note, there is no orange color function into QlikView. Therefore, Orange color will not work and you have to use color code such as, mentioned in 2nd Way:
=If (budget = 1, Green(),
If (budget = 2, Orange(),
If (budget = 3, Red())))
2nd Way:
=If (budget = 1, RGB(0,255,0),
If (budget = 2, RGB(255,153,0),
If (budget = 3, RGB(255,0,0))))
3rd Way: (Best way for big projects)
Create variables for each color and use them where you need, such as given below:
Settings > Variable Overview > Add > variableName ( ex. vColorGreen ) > Select Variable > Give value into variable Definition ( ex. RGB(0,255,0) )
vColorGreen = RGB(0,255,0)
vColorOrange = RGB(255,153,0)
vColorRed = RGB(255,0,0)
=If (budget = 1, $(vColorGreen),
If (budget = 2, $(vColorOrange),
If (budget = 3, $(vColorRed))))
Kind regards,
Ishfaque Ahmed
Thank u Ahmed.It worked..