Forum Discussion

duncanmci's avatar
duncanmci
Regular Visitor
6 years ago

Map Visualisation - Location not unique - Alternate Primary Key

I have a situation where I have multiple customers at the exact same physical location. For example:

 

Location ID     Customer Address                                    Customer Name

1234               200 Queen Street, Brisbane Qld 4000       ABC Company Pty Ltd

9876               200 Queen Street, Brisbane Qld 4000       XYZ Company Pty Ltd

 

On a map object, the Location (i.e. the Customer Address) appears to be considered the Primary Key, but as this example demonstrates, the Customer Address by itself is not unique.


I have Sales data in one table, and Customer data in another table, with the Primary Key of the Customer table being "Location ID". As you can see from the above example, the Location ID is unique, but the physical address is not.


When mapping customer sales, the tooltip will display the incorrect Customer Name (First/Last) and Location ID (Sum/Count/Min/Max etc). 


If I were to create a composite key with Location ID (or other), then the address would not map correctly – it would be an invalid address.


Without merging the datasets (massive amounts of duplicated data – that’s why we have a data model), is there a way to set an alternate Primary Key on the Map object so that the correct customer details are shown?


As properties/addresses change hands, this is also problematic when considering historical data.

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    duncanmci Would adding an index column be a way to achieve this?

    • duncanmci's avatar
      duncanmci
      Regular Visitor

      Thanks but no that doesn't work either. Irrespective, I need the Legend to represent a geographic region and having thousands of items in a legend (individual addresses) is a bit of overkill.