Skip to main content
Hello,

 

 

Think what I want to do is pretty simple but I can't get to the end. 

 

 

I need to take a attribute "COMPANY" and figure out the top ten companies and assign 1-10 to each according to the number that is summed up on said company. I need a new column that will designate 1, 2, 3 etc for whatever companies end up being the top ten. Everything after 10 would be nice if I could just make that 11. StatisticsCalculator can get me the top ten but I can't figure out where to go from there. Also doesn't seem (as far as I can currently tell) that I can keep the attribute table after it goes through the calculator. Any help is greatly appreciated. Let me know if you need more information. 
If the column is sortable, you can of course add a counter (use counter transformer) after sorting. That will create a order.

 

 

StatCalc can pass attributes trough the "summary". It depends on what you do and want.

 

GroupBY is a way to do so, but only if the grouping does nto change statistic evaluation (else you end up with a different result).

 

 

Also using "complete" and "summary" output, will always pass attributes.
Yes, it feels like a StatisticsCalculator GROUPED BY the "COMPANY" field and analyzing your NUMBER field is what you'd want. Then take the "Summary" features that come out of that (there shoudl be 1 per company) and sort (Sorter) by whatever attribute you set to hold the SUM.   Then use a counter to assign your ranking.  And one last thing -- an attributecreator that does a Conditional value to set anything > 10 to 11, and leave everything else alone. HOpe this helps.
Thank you, I was able to get everything worked out!

Reply