Dear Community,
I am trying to write a multiple Iif condition but not sure how to do it right.
I have a simple Table with IdCodes (integer) that correspond to Team Names. Each “Team_id” corresponds only to one “Team Name”.
Since there are lot of them (around 60 types of Team_id), I need to group them in order to use the result in a Selector widget in my Dashboard.
I want to tell de dashboard that he should filter the data based on the Team Category (see table but the Column “Team_category” doesn’t exist, this is what I need the Arcade expression t figure out).
If Team_id is greater than or equal to 1000 AND less than or equal to 1999 = CAT 1, but if the Team_id is greater than or equal to 2000 AND less than or equal to 2999 = CAT 2 and so on….for at least 9 or 10 times.
The expression should return the full of my original table + the new Field “Team_category” which I will use in a SELCTOR widget to filter data as “Grouped values”..
I found this answer but it is not quite what I need….
https://community.esri.com/t5/arcgis-online-questions/arcade-expression-to-find-text-in-string-and/td-p/300824
Any help? Thank you all!!!
😁🙏
Team_id | Teamn_name | Team_category |
1000 | Team A | CAT 1 |
1001 | Team B | CAT 1 |
1200 | Team C | CAT 1 |
2000 | Team D | CAT 2 |
2001 | Team E | CAT 2 |
2100 | Team F | CAT 2 |
3000 | Team G | CAT |
3001 | Team H | CAT 3 |
3700 | Team I | CAT 3 |
… | …. | … |
9000 | Team XYZ | CAT 9 |