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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
PowerrrBrrr
Helper III
Helper III

How can I get latitude and longitude from same column by filtering

I have below 2 tables with one to many relationship.All name which contains "LAT" are lattitude and those which contains "LONG" are longitude. How can I get all Latitude and Longitude values from Table 2 so that I can plot it in a map visual. is it possible to do it by creating measure??

So for ex Table A:

ID             Name
2022212        BAN_LAT_A
2022213       HUY_ASD_LAT
2022215       HUY_OP_LAT
2022217               LAT
2022189        OPO_LONG_A

 

and Table B:

                          ID                                        VALUE
2022212                                           28.3
2022212                                            32.4
2022213                                            44.2
2022213                                            86.7
2022213                                            23.9
2022215                                            65.2
3 REPLIES 3
TomMartens
Super User
Super User

Hey @PowerrrBrrr ,

 

as Lat/Long is a pair of datapoints, I have no idea how this datapoint will look like.

 

Please provide your expected result based on the two tables you already provided, please explain the rules how this result has been created.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Yes ,these are the lattitude and longitude datapoints. I needed to seperate the lattitude and longitudeto plot it in a map visual. Dont go by values (the datapoints are actual longitude and lattitude). But I dont know how can I seperate them. I can do by creating duplicate tables one with only Lat and other with only Long. But I was preferring if there is more easy way which do not  include creating new tables and columns

Anonymous
Not applicable

Hi @PowerrrBrrr ,

I noticed in the sample data in Table B, one ID contains multiple values. How do I know which one of them corresponds to the latitude value or the longitude value? If there is only a single value, you can create the following measure to get the latitude and longitude values.

Latitude/Longitude =
CALCULATE (
    MAX ( 'Table B'[VALUE] ),
    FILTER ( 'Table B', 'Table B'[ID] = SELECTEDVALUE ( 'Table A'[ID] ) )
)

yingyinr_0-1634194589632.png

Best Regards

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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