Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
zeissone
New Member

Can I visualize two location table on one map? and get distances between two points?

I have two data table.
Table No.1 : my clients' locations with latitude and longitude.
Table No.2 : realtime earthquake data with ltitude and longitude. (automatically updated every 5min.)
- source link : http://earthquake.usgs.gov/earthquakes/feed/v1.0/csv.php


Question no.1
Can I put two table's lat./long. in one map? I can make two seperated map with each table but I can't make it on one map.

Question no.2
I want to calculate distance between all my clients' location to each earthquake's position.
and I want to show clients' position which is nearby earthquake points (maybe in 100km radius)

1 ACCEPTED SOLUTION

@zeissone 

Question no.1
Can I put two table's lat./long. in one map? I can make two seperated map with each table but I can't make it on one map.

You can't have multiple lat/long values. You would need to merge the data and have one table with all lat/long values. Include a column for Type (client, earthquake), then you could use the Type column as a legend to seperate them. This gets you just the differences and locations.

 

Question no.2
I want to calculate distance between all my clients' location to each earthquake's position.
and I want to show clients' position which is nearby earthquake points (maybe in 100km radius)

There is no mapping feature that comes out of the box in Power BI that will let you do this. You could use R to build maps and determine the distance between points, but you will need to custom build that.


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

View solution in original post

7 REPLIES 7
Sean
Community Champion
Community Champion
Greg_Deckler
Super User
Super User

I would add a custom column to both queries with static values. For example, a "Type" column with either "Customer" or "Earthquake" as its value. Then, use an append query to append the tables together and use the "Type" column as a legend.

 

For your other issue, you could either do some type of join where you join your customers with each earthquake row or you could create a measure that does the calculation and perhaps do a matrix visualization with earthquake, client and your measure.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler , 

Ressurrecting this ancient post here... I followed your advice on appending queries based on a Type column. 
If the two tables have different names for the "lat" and "long" columns, how can I combine these as well in PowerBI?

Thank you!

Sean
Community Champion
Community Champion

In the Query Editor rename the lat/long columns in one of the tables to match the names in the other table.

THEN append using either method. That should work Smiley Happy

That did it. Thanks!

 

zeissone
New Member


I have two data table.
Table No.1 : my clients' locations with latitude and longitude.
Table No.2 : realtime earthquake data with ltitude and longitude. (automatically updated every 5min.)
- source link : http://earthquake.usgs.gov/earthquakes/feed/v1.0/csv.php


Question no.1
Can I put two table's lat./long. in one map? I can make two seperated map with each table but I can't make it on one map.

Question no.2
I want to calculate distance between all my clients' location to each earthquake's position.
and I want to show clients' position which is nearby earthquake points (maybe in 100km radius)

@zeissone 

Question no.1
Can I put two table's lat./long. in one map? I can make two seperated map with each table but I can't make it on one map.

You can't have multiple lat/long values. You would need to merge the data and have one table with all lat/long values. Include a column for Type (client, earthquake), then you could use the Type column as a legend to seperate them. This gets you just the differences and locations.

 

Question no.2
I want to calculate distance between all my clients' location to each earthquake's position.
and I want to show clients' position which is nearby earthquake points (maybe in 100km radius)

There is no mapping feature that comes out of the box in Power BI that will let you do this. You could use R to build maps and determine the distance between points, but you will need to custom build that.


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.