Help! Trying to label features based on info from multiple rows

1492
2
06-27-2013 08:01 AM
AaronBryant1
New Contributor
I am adding a spreadsheet that has soil and groundwater data into Arc where there are repeating SampleID's. Samples were taken from multiple depths at the same location and multiple analytes measured from each depth. I need to label each location with the depth, analytes measured from that depth, and results. I really need help figuring this out, I have seen other examples on the internet but have been unable to implement their code into my map. I attached a sample picture of a similar label and a screenshot of my excel spreadsheet.[ATTACH=CONFIG]25552[/ATTACH][ATTACH=CONFIG]25551[/ATTACH]
Tags (2)
0 Kudos
2 Replies
JanetBrewster
Occasional Contributor II
Have you played around with creating your own expression in labels?  You can do this via text from the Drawing toolbar or via the Labels tab in Layer Properties. The former is better if you want to do each label individually, the latter is better for automating labels and you can make attributes part of the expression.

I'm not a programmer and I'm able to do this fairly easily -- you just have to make sure the code is exact. There's a matrix of the codes in Help, "Formatting tags available in ArcMap". Or you can access it via the Properties dialog when you add text manually in ArcMap (use the "About formatting text" link at the bottom of the dialog box). For example, if I wanted to bold the word "text" in my label, I'd type <BOL>text</BOL>

To put text on another line in your label, add "& vbcrlf &" (w/o the quotes) in the expression each time you want text on a new line.

Does this help?
Janet
0 Kudos
by Anonymous User
Not applicable
Original User: rfairhur24

I am adding a spreadsheet that has soil and groundwater data into Arc where there are repeating SampleID's. Samples were taken from multiple depths at the same location and multiple analytes measured from each depth. I need to label each location with the depth, analytes measured from that depth, and results. I really need help figuring this out, I have seen other examples on the internet but have been unable to implement their code into my map. I attached a sample picture of a similar label and a screenshot of my excel spreadsheet.[ATTACH=CONFIG]25552[/ATTACH][ATTACH=CONFIG]25551[/ATTACH]


Unfortunately Janet's suggestions won't help you with your initial problem, because you have a one-to-many relationship, but want it to function like a one-to-one relationship.  This is one of the most common problems on the forum everyone has.  The standard way I deal with this is by first concatenating the values from separate fields into a single field and then using the Pivot table tool to bring those concatenated values together into a single row that can be joined and labeled on a single feature.  Requires an Advanced license to do that, however.  What is your license level and what version of ArcGIS are you using?

Once they are in a single record you can use many of the suggestions by Janet to format the labels so that they display the information in multiple rows.
0 Kudos