Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Change color of location points based on a dimension

Hi there, I have a simple google maps document that I'm struggling with. In the attached QVW I have a map of three retailers (Albersons, Costco, Safeway). I am trying to do the following:

1. Make the points of each Chain banner a different color. i.e Albertsons = BLUE DOTS, Costco = GREEN DOTS, Safeway = RED DOTS

Another thing I'm trying to do answer questions like this: Show all the SAFEWAY Accounts within a lassoed geography. Show me on the map all the SAFEWAY accounts that are carrying BLACK CHERRY. Now show me all the SAFEWAY accounts that are not carrying BLACK CHERRY but also at the same time show me all the ALBERTSONS and COSTCO accounts that do carry BLACK CHERRY. Basically I want to show our SAFEWAY customers that don't carry BLACK CHERRY, all the ALBERTSONS and COSTCO accounts that do and where they are located in relation to one another on the map.

Also, when I add the slider bars, to allow panning vertically or horizontally as well as a scroll bar for zooming, the map stops functioning. Does anybody know why that happens? Perhaps I'm not adding the slider bars correctly. Can someone show me how to add a zoom, pan left and right slider bar onto this document? thanks

7 Replies
disqr_rm
Partner - Specialist III
Partner - Specialist III

For #1:

In your expression, expand "longitude" and double click on "Background Color". Here type expressions like:


=if(VPDBA = 'ALBERTSONS SUPERVALU', blue(),
if(VPDBA = 'COSTCO WHOLESALE', green(),
red()))


This will take care of your color question.

I will read your other questions and see if I can be of any help.

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Mike,

Rakesh already addresses your question about colors.

With regards to your other question, I'd suggest addressing it with Set Analysis expressions, and sometimes with simple selections:

- Show all locations that carry Black Cherry - simple selection of Black Cherry will do the job.

- Show all locations that don't carry... - this can be done with "Select Excluded"

- Combinations of included and excluded - here you'll need to get into Set Analysis Expressions. For example, have the user select Product and Retailer and create expressions like:

- Selected Retailer that carries selected products

- Selected Retailer that does not carry select products

- Other (not selected) retailers that carry selected products, etc...

I'm not sure what's happening with slider bars... Probably has to do with the translations of pixels into long/lat and back. The map is working properly as long as the "static min" and "static max" on the Axis tab are calculated properly, with relation to the current zoom factor of the Google map. I suspect than adding scroll bars creates some distortions..

cheers,

Oleg

Not applicable
Author

Thank Rekesh, this is working for the colour change. I am still trying to wrap my head around the set analysis component that Oleg has suggested for the second part of my problem...

Not applicable
Author

Hi Mike,

For the 1st point you have another solution, more simple I think if you have more chain Banner.

Just add, in the dimension, chain banner as a second dimension, then go to the color panel to set the color you want to assign.

In the expression, supress what you have in the background color

regards jjj

Not applicable
Author

Thanks. That's a good answer. Is there a way to put a colored dot in the field selector next to the name of the chain banner?

Not applicable
Author

you mean create a legend ?

I created a non dynamic legend in an application http://community.qlik.com/media/p/91697.aspx

maybe it could help you

jjj

Not applicable
Author

I guess it is a legend but the legend will give different colours to all the invidivual stores (i think). I want the banner colors to be consistent across each banner.