Forum Discussion

Sania-F's avatar
Sania-F
Resolver I
9 months ago
Solved

Azure maps - need help with mapping region

HI All, I have region names like ->  West US 2 central US south India north Europe east Central US US Virginia   I am trying to show a numeric value against these regions on ...
  • Hans-Georg_Puls's avatar
    9 months ago

    Hi Sania-F ,

    google maps recognizes parts of countries such as "South India" or continents such as "North Europe" and draws a suitable border. As far as I know and have experienced the Power BI Azure Maps visual is not able to do that. This means you have to create a mapping table to map your regions to countries. Hope that helps.

  • Hans-Georg_Puls's avatar
    9 months ago

    Hi Sania-F , if you are interested in the Azure Regions, there is a microsoft source to get these. Here is an Power Query Example based on a Web source:

     

    let
    Source = Json.Document(Web.Contents("https://datacenters.microsoft.com/wp-json/globe/regions")),
    #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"ID", "post_author", "post_date", "post_date_gmt", "post_content", "post_title", "post_excerpt", "post_status", "comment_status", "ping_status", "post_password", "post_name", "to_ping", "pinged", "post_modified", "post_modified_gmt", "post_content_filtered", "post_parent", "guid", "menu_order", "post_type", "post_mime_type", "comment_count", "filter", "continent", "location", "geographyId", "latitude", "longitude", "typeId", "isOpen", "hasGroundStation", "yearOpen", "dataResidency", "availableTo", "announcementLink", "productsByRegionLink", "productsByRegionLinkNonRegional", "availabilityZonesId", "availabilityZonesNearestRegionIds", "disasterRecoveryCrossregionIds", "disasterRecoveryInregionIds", "sustainabilityIds", "complianceIds", "sustainabilityFactsheet", "image", "circularAvailableLink", "TEST", "id", "displayName"}, {"ID", "post_author", "post_date", "post_date_gmt", "post_content", "post_title", "post_excerpt", "post_status", "comment_status", "ping_status", "post_password", "post_name", "to_ping", "pinged", "post_modified", "post_modified_gmt", "post_content_filtered", "post_parent", "guid", "menu_order", "post_type", "post_mime_type", "comment_count", "filter", "continent", "location", "geographyId", "latitude", "longitude", "typeId", "isOpen", "hasGroundStation", "yearOpen", "dataResidency", "availableTo", "announcementLink", "productsByRegionLink", "productsByRegionLinkNonRegional", "availabilityZonesId", "availabilityZonesNearestRegionIds", "disasterRecoveryCrossregionIds", "disasterRecoveryInregionIds", "sustainabilityIds", "complianceIds", "sustainabilityFactsheet", "image", "circularAvailableLink", "TEST", "id", "displayName"}),
    #"Expanded image" = Table.ExpandRecordColumn(#"Expanded Column1", "image", {"ID", "id", "title", "filename", "filesize", "url", "link", "alt", "author", "description", "caption", "name", "status", "uploaded_to", "date", "modified", "menu_order", "mime_type", "type", "subtype", "icon", "width", "height", "sizes"}, {"image.ID", "image.id", "image.title", "image.filename", "image.filesize", "image.url", "image.link", "image.alt", "image.author", "image.description", "image.caption", "image.name", "image.status", "image.uploaded_to", "image.date", "image.modified", "image.menu_order", "image.mime_type", "image.type", "image.subtype", "image.icon", "image.width", "image.height", "image.sizes"}),
    #"Expanded image.sizes" = Table.ExpandRecordColumn(#"Expanded image", "image.sizes", {"thumbnail", "thumbnail-width", "thumbnail-height", "medium", "medium-width", "medium-height", "medium_large", "medium_large-width", "medium_large-height", "large", "large-width", "large-height", "1536x1536", "1536x1536-width", "1536x1536-height", "2048x2048", "2048x2048-width", "2048x2048-height"}, {"image.sizes.thumbnail", "image.sizes.thumbnail-width", "image.sizes.thumbnail-height", "image.sizes.medium", "image.sizes.medium-width", "image.sizes.medium-height", "image.sizes.medium_large", "image.sizes.medium_large-width", "image.sizes.medium_large-height", "image.sizes.large", "image.sizes.large-width", "image.sizes.large-height", "image.sizes.1536x1536", "image.sizes.1536x1536-width", "image.sizes.1536x1536-height", "image.sizes.2048x2048", "image.sizes.2048x2048-width", "image.sizes.2048x2048-height"}),
    #"Renamed Columns" = Table.RenameColumns(#"Expanded image.sizes",{{"image.id", "image.id.1"}, {"id", "id.1"}}),
    #"Changed Type" = Table.TransformColumnTypes(#"Renamed Columns",{{"ID", Int64.Type}, {"post_title", type text}, {"post_name", type text}}),
    #"Removed Columns" = Table.RemoveColumns(#"Changed Type",{"post_excerpt", "post_status", "comment_status", "ping_status", "post_password", "post_author", "post_date", "post_date_gmt", "post_content", "to_ping", "pinged", "post_modified", "post_modified_gmt", "post_content_filtered", "post_parent", "menu_order", "post_mime_type", "comment_count", "filter", "isOpen", "hasGroundStation", "yearOpen", "dataResidency", "availableTo", "announcementLink", "productsByRegionLink", "productsByRegionLinkNonRegional", "availabilityZonesId", "availabilityZonesNearestRegionIds", "disasterRecoveryCrossregionIds", "disasterRecoveryInregionIds", "sustainabilityIds", "complianceIds", "sustainabilityFactsheet", "image.ID", "image.id.1", "image.title", "image.filename", "image.filesize", "image.url", "image.link", "image.alt", "image.author", "image.description", "image.caption", "image.name", "image.status", "image.uploaded_to", "image.date", "image.modified", "image.menu_order", "image.mime_type", "image.type", "image.subtype", "image.icon", "image.width", "image.height", "image.sizes.thumbnail", "image.sizes.thumbnail-width", "image.sizes.thumbnail-height", "image.sizes.medium", "image.sizes.medium-width", "image.sizes.medium-height", "image.sizes.medium_large", "image.sizes.medium_large-width", "image.sizes.medium_large-height", "image.sizes.large", "image.sizes.large-width", "image.sizes.large-height", "image.sizes.1536x1536", "image.sizes.1536x1536-width", "image.sizes.1536x1536-height", "image.sizes.2048x2048", "image.sizes.2048x2048-width", "image.sizes.2048x2048-height", "circularAvailableLink", "TEST"})
    in
    #"Removed Columns"