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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors