5 Replies Latest reply on Mar 26, 2020 5:48 AM by Ken Flerlage

# Polygons and Financial Data

Hi everyone.

I would very much appreciate some assistance with a problem I am facing, which is combining polygons with sales data (and not with the coronavirus).

I am making a demo for an agricultural cooperative, in which I try to combine polygon data with members' financial data.

I have analysed the financial data in sheets and dashboards and everything works fine.

The problem arises when I try to connect the polygon data that show each members' fields.

Because polygons have multiple lat and long values, these values alter the sum of sales from each member (eg if a polygon has 4 lat and long values, the sales value of January which is 100\$, becomes 4*100=400)

This is probably because the lat and long values are read as different points and not as one.

If someone can help I would appreciate it.

Regards

Panagiotis from Katerini, Greece

• ###### 1. Re: Polygons and Financial Data

You'll probably need to use an LOD calculation to eliminate the impact of the duplicate records. See use case # 1 on the following: 20 Uses for Level-of-Detail Calculations - The Flerlage Twins: Analytics, Data Visualization, and Tableau

Also happy to show you with your data if you could provide a sample.

• ###### 2. Re: Polygons and Financial Data

Thank you very much Ken.

I've watched a lot of Tableau training videos but wasn't really focused on the LOD ones (acronyms usually appear when things get messy..).

I am also attaching a sample of the data. The first sheet is the polygon data and the second has the financial data.

Thank you again

• ###### 3. Re: Polygons and Financial Data

OK, so I'm assuming you're joining based on the member ID and, when you try to aggregate one of your measures, such as Sales, you get this duplication effect. Essentially everything is multiplied by 10 since this member's polygon has 10 points.

To address this, we can use LOD calculations to remove the impact of the duplicate records. For example:

Sales De-Duped

```// Remove the impact of duplicate records:
{FIXED [Date], [Member Code]: MAX([Sales])}
```

This will get the maximum value of Sales for each unique set of Dates and Member codes. When you then aggregate these, it will not aggregate for each polygon point.

You'd then create similar LOD calculations for your other measures (just replace Sales with the other measure names).

See attached.

• ###### 4. Re: Polygons and Financial Data

Thank you Ken.

I tried it on the other variables and it works as well.