Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for Data Integration and Data Analytics gurus. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Highlighting single value AND current selections in chart?

Hi all - this is continuing from a different discussion I started yesterday.  I have a mekko chart where I would like to have one specific value in a field ("Prime") colored light grey, and all current selections highlighted in green.  Everything else can default to the standard color scheme.  Right now, I can get the specific value ("Alpha") highlighted by editing the background color with the following:

=IF([Prime]='Alpha',RGB(242,242,242))

That works just fine.  Similarly, I can highlight single selections within Prime if I use the following in background color:

=IF(Prime=GetFieldSelections(Prime),Green())

If I make more than one selection within Prime, then it doesn't work.  The biggest problem comes when I try to combine the two - I lose the functionality of both.  I have tried;

=IF(Prime=GetFieldSelections(Prime),Green()) and IF([Prime]='Alpha',RGB(242,242,242))

=IF(Prime=GetFieldSelections(Prime),Green()) or IF([Prime]='Alpha',RGB(242,242,242))

Either nothing works, or 'Alpha' gets colored white and none of the selections show up in the right color.

How can I combine or change the equations such that "Alpha" always remains light grey (or green when selected - either works), and any and all selections in "Prime" are colored green?

2 Replies
Highlighted
MVP & Luminary
MVP & Luminary

Re: Highlighting single value AND current selections in chart?

maybe something like this:

if(only({1}[Prime])='Alpha',RGB(242,242,242), if(match(Prime, $(=concat(distinct chr(39) & Prime & chr(39),',')) ,green()))


talk is cheap, supply exceeds demand
Highlighted
Not applicable

Re: Highlighting single value AND current selections in chart?

That didn't seem to work, unfortunately.  Alpha lost its coloration and current selections do not appear green.