Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Static Location in Map along with Dynamic Locations

Hi All,

I'm trying to put few locations on my Map in qlikview.

Basically, I have two sources. Let's say, One is my locations for warehouses. And another is the locations for stores.

Currently both sources are different and I don't have any connections between them.

My Table Structure is

Warehouses :

Latitude     Longitude     Warehouse Name

Stores:

Latitude      Longitude     Store Name     Store Type  

My requirement is Warehouses should be Green and Stores should be Red. Which I have already achieved. I've attached my app.

But the point I'm struggling is when I select Store Type, Warehouses gets disappeared. This is happening since there's no connections. Or, when I'll select certain store type, corresponding latitude and longitude would be selected which will not match to any of the Warehouse and hence they'll disappear.

Can anyone help me how to achieve this ? I feel my data modelling is wrong.

Many thanks in advance

Regards,

Hardik

5 Replies
petter
Partner - Champion III
Partner - Champion III

You need to have a way of calculating the proximity of all locations in relation to each other. I will have a look at it since I haven't tried to solve this myself previously - one link I found that I will pursue is the Stack Overflow article that

you find if you follow this link:

 

    math - How do I calculate distance between two latitude-longitude points? - Stack Overflow

I will get back to you as soon as I have a solution for this in your attach QVW ...

petter
Partner - Champion III
Partner - Champion III

First of all I would have considered keeping all locations in one table and rather have an extra field specify the Location Category. Then you will have more flexibility in your selections I think.

Furthermore a Distance Table should be calculated. The cartesian product of the different locations. Using a formula to calculate the distances in airline between every location (latitude,longitude). If you already have a distance, cost, time table between every location that could be very helpful for calculating other interesting aspects from you map.

Anonymous
Not applicable
Author

Hi Petter,

Thanks for the reply.

You're right that I should keep all the locations in single table. Which I'm already doing. However, when I select any attribute of Stores, warehouse gets disappeared.

However, my requirement is in any case, warehouse shouldn't go away on selections of store attribute.

Regards,

Hardik

petter
Partner - Champion III
Partner - Champion III

I mean the extra tables shouldn't be split off from the main location table. It is probably better with all type of location information in one table - due to the selection logic in QlikView and how associations work - which cause problems for you.

Have a look at my modified QVW which I attached - I also added a distance table.

Anonymous
Not applicable
Author

Hi Petter,

Many thanks for sharing the app. This looks great.

However, in my case, on selecting attributes of stores, like store type, warehouses gets disappeared and that's pretty obvious with how qlikview works on associative model.

I got that work, by calculating distance between them and creating a link table to link keys from Stores and Warehouses for the distance less than 1 mile and that's how even after selecting attributes of stores (i.e. General Store, Production Store etc in my case), nearby warehouses will still be there.

I'll upload my app too if you wanna give your feedback on that.

Many thanks though.

Regards,

Hardik