9 Replies Latest reply on Jun 18, 2018 7:49 AM by Jim Dehner

# How to calculate an area of a polygon

Hello Community,

I have a question. I would like to know how to calculate the blue area created in this polygon (see image). Would it be possible? My idea would be to give it a value from 0 to 100 and use it as a filter to find "who's the best player", for example. I've been struggling with this and it was impossible... I'm sure it doesn't have to be so difficult! Thank you very much in advance if someone could help me with this.

THANK YOU!

• ###### 1. Re: How to calculate an area of a polygon

Good morning Jose

I think this might work - each of the individual areas is a triangle - the area of the triangle is 1/2 x base x height

for any the triangle that starts at 12:00 and goes to 1:00  the 2 sides are defined as a value that represents like Goals (say A in the formula below)  or % conversion (B in the formula)-

don't know how you did that but you have those values -

the base will me max(A,B) and teh height will be abs((A-B))/2

you would find A and B values by using lookup(dimension,0) and Lookup(dimension,1)

then you would sum each of the triangles - think like doing a window sum of the calculated field

Let me know if that helped

Jim

If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

• ###### 2. Re: How to calculate an area of a polygon

Thinking about it a little more it would make sense for A  to be the max() of the 2 sides and B to be the Mni()

Jim

• ###### 3. Re: How to calculate an area of a polygon

Hi Jim,

Thank you very much for your answer. I've been trying it for some hours, but unfortunately I couldn't get it...

Send you the file here clean in case you could have a look and try with your method creating a calculated field. My aim would be to get a value between 0-100 for each player.

I'm gonna continue trying... thank you so much again!

Jose

• ###### 4. Re: How to calculate an area of a polygon

(I added the file at the first comment, sorry).

Thank you again.

• ###### 5. Re: How to calculate an area of a polygon

see the attached

I am not a statistician so I don't know the process you are using and with the 3 data sources and some of the formating it gets a little confusing

I think your "Stat Values" are actually percentages of the  and there are 12 of them

I converted the formulas I game you before into this

and

The area is divided by 100 to correct for the percentage format (or lack thereof in the vis )

now for the total I think it is a weighted average based on the percent percentages - there are 12 segments each with equal weight

I think this is correct - you can check it against something you know

in text table form it returns this

Jim

If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

• ###### 6. Re: How to calculate an area of a polygon

Thank you so much! You are really kind. I'm gonna trying this now, even though I can't open your attached file

I'll let you know. Thank you again.

• ###### 7. Re: How to calculate an area of a polygon

Good morning

Gave this some more thought over the weekend

I think the Height value was incorrect - it should be this

Making the outcome this

the file is attached again as a 10.2 twbx workbook

Jim

• ###### 8. Re: How to calculate an area of a polygon

That's awesome, Jim! Thank you very much.

It makes now sense and it's great. I would like to use this value as a filter too, but when I create a new sheet and add it, this happen:

It changes to a superior value of 100. It's ok, because it keeps the scale and the best ones (Reyes - Guardiola) have a higher value, but would be so good between 0-100.

My final aim would be to use this "total area" as a "Total Index" in order to "rate" the players. Imagine this with a database of 10,000 players and use the filter to get who are "the best". That'd be amazing.

Thank you very much!