Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
VaishnaviMogal11
Partner - Contributor III
Partner - Contributor III

conditional coloring to graph based on multiple selection

Hi,

I need to dynamically color the bar graph based on multiple selection made by user in map view.

i have created map view with data as lat_lon_point field, and location as latitude= only({1}lat) and longitude = only({1}lon).

in bar graph added dimension as delta_t_bin field and measure as count({1}distinct charge_session).

used color expression is: if(
match(lat_lon_points,GetFieldSelections(lat_lon_points,',',1000)),
Green(),Red())

refer below ss to understand the scenario.

in 1st pic, I have selected single point from map, so the below bar graph is filtering as charge sessions having selected lat_lon_point value is colored as green and remaining are red. it is working fine as required.

VaishnaviMogal11_0-1732169697617.png

In 2nd pic, user selected multiple points from map(5), but bar graph has not filtered. how can i achieve this?

VaishnaviMogal11_1-1732169733844.png

 

please reply to it and share any relevant information if you have, it would be very help

Thank you!

@sunny_talwar 

Labels (3)
1 Reply
sbaro_bd
Creator III
Creator III

Hi @VaishnaviMogal11 ,

The issue from the Getfieldselections() function. If you want to get the list of values compatible with Match() function, try this : 

 if(
match(lat_lon_points, Chr(39) & GetFieldSelections(lat_lon_points, Chr(39) & ',' & Chr(39),1000)),
Green(),Red())

Regards.