Hello,
Im pretty new on using arcmap and specially using the modelViewer.
Im trying to do the following:
I have 2 layers, point and polygon, that i used a spatial join to know how many points are intersected in the polygon layer.
After i generate the result in a join_count field, i want to add in the percentaje field, the % related to the total of points that i have.
My model is the following.: campamentos is my polygon layer and sed_006 is my point layer.
After executing the model, the percentaje field is still 0.
My formula for calculate field is ([Join_Count]*100)/Filas.
What am i doing wrong?
Thanks for all the help provided!
Solved! Go to Solution.
I used the following workflow
Summary Statistics: SUM
Get Field Value:
The expression in my Calculate Field Tool looks like this
([Join_Count]*100)/%Value%
Result:
just a guess but that looks like vb syntax. and assuming it is a field, you might want to try python syntax
!join_count!*100.0/filas
Now if it isn't the python vs vb thing, then you should always promote one of the variables to ensure that the math is done as floating point math that is why I put 100.0 instead of 100, since the latter is an integer
You mean this? (It didnt work tho)
So is Join_count a field to begin with? and it looks like you are using one of those iterators.
At this stage, it would be best to run through that calculation manually in arctoolbox, then get the correct syntax from the Results window and use it. Alternately, if you typed that expression in... don't, use the little calculator to the right of the expression line and select what you can from there typing as little as possible
Finally... doing it manually will at least confirm whether there was any count other than 0 which may be a valid observation
I dont understand what i need to do.
But I have the following:
In the camp_spatialJoin as a result (the green circle) i have this info:
Where i have the field percentaje in 0 and for that row, the join_count in 1.
So how to set up the model to have my final result with the percentaje of join:count*100 / qtty of points in sed_006 resource.
I used the following workflow
Summary Statistics: SUM
Get Field Value:
The expression in my Calculate Field Tool looks like this
([Join_Count]*100)/%Value%
Result:
You can see Get Field Value tool here.
Im going to try that thanks!