Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QLIKWORLD LIVE! MAY 16 - 19TH, EARLY BIRD DISCOUNTS! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
apthansh
Creator
Creator

assigning color to text object

  if(Location='NewYork' ,

    if([Score] >=11 ,green(),

     if([Score] <=11 ,yellow(),

      if([Score] =0,red()))))

Can I use the above expression to assign colors to text objects ?

1 Solution

Accepted Solutions
sunny_talwar

May be this

If(Only({<Location *= {'NewYork'}>} Location) = 'NewYork',

     If(Only({<Location *= {'NewYork'}>}[Score]) = 0, Red(),

     If(Only({<Location *= {'NewYork'}>}[Score]) <= 11, Yellow(), Green())))

View solution in original post

4 Replies
sunny_talwar

This will work only if there is only one possible Location and Score are there? If you have more than one option for either of them, it might not work

apthansh
Creator
Creator
Author

Ya...I have more locations..How can i resolve that ?

woshua5550
Creator III
Creator III

Hi Ansh

plz explain more , let's say we have three locations "New York","London","Beijing"

what color would you like to show when user select more than 1 location , for example "New York"&"London"?

sunny_talwar

May be this

If(Only({<Location *= {'NewYork'}>} Location) = 'NewYork',

     If(Only({<Location *= {'NewYork'}>}[Score]) = 0, Red(),

     If(Only({<Location *= {'NewYork'}>}[Score]) <= 11, Yellow(), Green())))