I'm not sure i completely follow, but I partially follow 🙂
In the case of
BALLOON PN NEW EXIST REL
1 001 3
2 001 2
3 001 1
Using the BOM to merge the rows would give you
4 001 varies varies varies
Though 4 is easily renamed.
I know you can use SUBSTITUTION in the column properties of the Parts List and SUM VALUES when the variable is present. That's usually used for summing things like mass when you have, say, 8 widgets each weighing 3lbs. In that case it sums that weight to 24lbs. Not sure how that'd work in this case as i've never tried it.
I just build up a idw/iam setup to test this. I got 1/2 way there. I made two parts, one for 'new' and one for 'exist'. Placed them randomly in the iam. Each part had NEW and EXIST custom properties. When giving each part a separate part number, it totalled those columns just fine. However, when i gave both parts the same part number it just generated *varies* because the values don't match part to part.
The only way I can think of you could probably do this is to have properties in your parts to identify them as you list, but then a separate set of properties to display in BOM. You could run a script that found all the parts you're after and tallies their number and then write that to the other variable in the ipt file. Only problem is you probably can't write to the ipart and even if you could, you'd have to write it down to each part so that they all have the same number to display in the BOM. You could get around that, i suppose, by having the script that counts them write the total down as a static value in the parts list, but i don't know that that is opened up to us to do in ilogic or vb. My recollections is you can kick the BOM out, but not really mess with it directly much.
Another method would be taking what you already had and removing New, Existing, Relocated from the BOM and adding that info as a seperate table. You could parse through all your parts, find the matching parts and tally their values and display it in that table as it only has to be written to that table only.