Please, is any known how to get unique values from tables with many repeating, which I need in my report? I try with simple table query as below, but without success! Please, help me! As assistance attached both tables. In first table I need Unique's from field 'TipAlteracije' from second field 'Naziv'
Thank you very much!
Distinct($featureSet, ["FieldName"])If you don't need to run Python, then the Frequency (Analysis Tools) | ArcGIS Pro documentation will do the job easily enough.
Robert_LeClair, Thank you! I'm going to see/try, but the expressions are limited to Arcade lng. only.
Best regards!
In full transparency, the Esri Support AI Chatbot came back with this below. It's somewhere to start in troubleshooting your expression:
Use Distinct() on a FeatureSet and pass both field names to get unique combinations of `Naziv` + `TipAlteracije`:
var u = Distinct($layer, ["Naziv", "TipAlteracije"])
return u
If you need it as a text list (for a report/dynamic text), concatenate the distinct rows:
var u = Distinct($layer, ["Naziv", "TipAlteracije"])
var s = ""
for (var r in u){
s += r.Naziv + " | " + r.TipAlteracije + TextFormatting.NewLine
}
return s
Reference: [Arcade FeatureSet functions — Distinct](https://developers.arcgis.com/arcade/function-reference/featureset_functions)
How is this question different from the one you posted Monday: https://community.esri.com/t5/arcgis-pro-questions/arcade-expression/m-p/1716921#M104072
@JoshuaBixby, Thanks! The question is the same, but the attachments/tables from which I need unique values are included. If you have time and can help, please write/explain how to get unique values. Distinct, at least in this case, simply doesn't not work!?!
THANKS, again!
Posting sample data is always a great idea. For future reference, you can go back and edit your original question to include the attachment and a note that says you attached it rather than creating a new post.