# Calculate if values in a column are the same

Question asked by geonetadmin on Oct 2, 2013
Latest reply on Oct 2, 2013 by RicardoMS77
Original User: RicardoMS77

Hi!

Here is my problem:
I have a shapefile with administrative sections and I have a shapefile with statistical sections. In some cases, statistical sections do not coincide with administrative sections, so I used intersect to separate the pieces of the statistical sections that were inside each administrative section.

[ATTACH=CONFIG]27950[/ATTACH] [ATTACH=CONFIG]27951[/ATTACH]

The result is statistical sections by administrative sections. The problem is that each piece of separated statistical sections have the same statistical code and the same statistical attributes. The thing is that now I want to calculate, for example, population for an administrative section, but that population is the same in the pieces of broken statistical sections, so it doubled. So, what I want to do now is to have the population of the administrative section, based on the proportion of the area of the broken statistical section.
Imagine that I have a statistical section that was separated into two pieces (50%), each to an administrative section. My population should be 50% into each of the administrative section. I need a way to do this automatically to a lot of fields and statistical characteristics and not always based on 50% and not forgetting that the population doubled in the statistical section that was cut.
I tried some phyton code, unsuccessfully.
Can anybody help me?

Thank you in advance.