Calculating Feature Count of attribute type using arcade

07-12-2022 01:52 PM
New Contributor II

I would like to create a table using a feature layer like below to show total number of collisions occured on Street #1 and Street #2. Furthermore, I would like to color code the table according to their Highest Damage field. For example; if any of the street1# fields have "4 - Severe" as a highest damage that line in the table would be red, otherwise it will be colored according to the highest level of damage.

Street NameNumber of CollisionHighest Damage
Street1#104 - Severe
Street1#82 - Moderate
Street1#62 - Minor
Street1#72 - Moderate
Street2#53 - Major
Street2#202- Minor
Street2#303 - Major


Ideally, I would like to have something similar to table below.

Street NameCount of the Total Collision


The list element in arcgis dashboard does not have the group values settings but I can colored code them using arcade (when logical function). On the other hand, the table element has the group values settings but if I group them by street name I could calculate the sum of the number of collision but I could not color code them by highest damage. So how could I merge this to things together?

Is it possible to achieve this by advanced formatting in Arcade? 

Any help ideas, code examples would be appreciated. Thanks!

0 Kudos
0 Replies