This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreGet Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.
Hi,
I have two tables:
Table 1 contains all X Y coordinates
Table 2 contains the polygon shape file coordinates,
I want to check which coordinates are within the polygon.
Solved! Go to Solution.
@samahiji You can leave your e-mail and i'll reply you with source code(about today or tomorrow).
Hello there,
I'm working on a similar conundrum. Do you still have the code to work on this?
Yes, let's have some tables from you. Preferably in an app (say Excel as a workbook).
I've been working on polygons like this and have (I think) been successful (purely in Power Query) but I won't post my offering (because it's a mess, currently) until I have a good idea of how your data arrives and how you want it to show at the end.
Hi @p45cal ,
That's exactly what I want. My data is huge, attached is a sample of it. I have two tables, the polygon X&Y is in sheet "Polygon", the data point is in another sheet "Points". A new column "IN/OUT" in sheet "Points" is calculated with 0 if out, 1 if in.
unfortunately, I can't upload the file, here is a snapshot.
My data is huge,
<snip>unfortunately, I can't upload the file, here is a snapshot.
1. Upload it to a file sharing site or onedrive, dropbox, box.com, googledrive etc. there are loads of them, and drop the link to it here.
If it contains sensitive info delete all unnecessary sheets and just supply two tables on two sheets. Pictures aren't much use.
2. Does it have to be Power Query? Could it be a custom user-defined function in vba (a macro)?
Hi @samahiji,
Thank you for reaching out to the Microsoft Fabric Community forum.
Here I have taken 2 sample datasets as per information and did the steps for your understanding, but it will be better for us to perform steps accurately and we can guide you accordingly if you can provide us the Data if possible.
This process can be done in many ways, where I followed DAX queries to perform.
For your Idea, I’ve attached the PBIX file with the implemented solution. Please review it and let us know is there any further questions.
If this post helps, please give us Kudos and consider Accept it as a solution to help the other members find it more easily.
Best Regards,
Sahasra.
@samahiji Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 3 | |
| 1 | |
| 1 |