# Weekly Challenge

Solve the challenge, share your solution and summit the ranks of our Community!
###### IDEAS WANTED

We're actively looking for ideas on how to improve Weekly Challenges and would love to hear what you think!

Submit Feedback
We've recently made an accessibility improvement to the community and therefore posts without any content are no longer allowed. Please use the spoiler feature or add a short message in the message body in order to submit your weekly challenge.

## Challenge #149: Market Overlap

Highlighted
Alteryx Community Team

We are 1 week out from challenge 150! Yes, that's right, a new badge is available starting next week for those we are up to date on all challenges!

In this week's challenge, we are going to be doing some calculations for market overlap!

Objective:
A retailer wants to analyze overlap for his current location's trade area against future locations.

1: For each proposed location, determine the % overlap of the existing location (e.g. if a proposed location overlaps 60% of the existing store's TA, the answer is 60%).

2: determine what % of current customers live inside each of the proposed trade areas

Summary of Data:
Proposed Locations polygon layer
Current location polygon layer
Current Customers

Hints: Customer Lat/Longs are integers
When joining to check your answer, don't join on a Double or Float.

Highlighted
Alteryx Certified Partner

Love the spatial challenges!

Highlighted
11 - Bolide

Cheers!

Spoiler
Highlighted
16 - Nebula
Spoiler
Highlighted
Alteryx Certified Partner

This was a fun one!

Spoiler
Highlighted
16 - Nebula

Went for a Spatial Formula approach...

Spoiler

Overlap:
```ST_Area(ST_Intersection([TradeArea],[SpatialObject_TradeArea]),"SqMi")
/
ST_Area([SpatialObject_TradeArea],"SqMi")*100```

Pct:
`IIF(ST_Contains([TradeArea],ST_CreatePoint([LONGITUDE]/1000000,[LATITUDE]/1000000)),1,0)`
Then just average 🙂
Highlighted
12 - Quasar

Spatial challenges are always great 🙂

Spoiler
Highlighted
Alteryx Certified Partner

Challenge Completed

Highlighted
10 - Fireball

This was fun!  Spatial challenges are great.

Spoiler

Highlighted
Alteryx Partner
Spoiler