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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
MykytYla
Frequent Visitor

I have longtitude and latitude, I need country name

I have the longtitude and latitude in the table, I need the country for this coordinate. What can I use DAX or power query

details.latitudedetails.longitudecountry
50.022996219.8952209Poland
2.9226565101.6514018 
50.065454419.9446763 
33.876305735.5204761 
40.967986929.0818521 
50.10917219.8307899 
2 REPLIES 2
v-linhuizh-msft
Community Support
Community Support

Thanks for the reply from @suparnababu8 .

 

Hi @MykytYla ,

 

As suparnababu8 said, DAX does not currently support this feature. Please allow me to provide another insight. We can create a custom function in Power Query and call the Google Geocoding API to find the location information.

 

For specific operations, please refer to the video below:

How to use the Google Geocoding API in Power BI | Quickly find Longitude and Latitude Coordinates - ...
Here is also a link to a similar problem as yours

Solved: Get city, longitude/latitude, country, or state/pr... - Microsoft Fabric Community

 

Best Regards,
Zhu
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.

suparnababu8
Super User
Super User

Hi @MykytYla 

Using DAX alone to retrieve country names from latitude and longitude coordinates is not  feasible because DAX doesn’t have built-in geocoding capabilities. May be in future we may expect from Microsoft.

 

DAX is primarily designed for data analysis and calculations within the data model.

 

I hope you are clear now!!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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