Forum Discussion
johkel
Apr 05, 2023Copper Contributor
using a column of geography data with formulas
Hi, I've created a map chart from a column of country names which has been converted to geography data. I would like to create a new column referencing the country name and looking up in an array in a separate sheet how many times the country name appears using a COUNTIF function. The formula returns 0 and appears to not be reading the country name. I have tested the formula by manually inserting a country name in a separate column and updating the formula to reference the new cell. Is there any way to reference the geography data country name to avoid this workaround? Thank you.
4 Replies
- SergeiBaklanDiamond Contributor
Or
=LET( names, UNIQUE(country[Country].Name), counts, MAP( names, LAMBDA(c, REDUCE( 0, country[Country], LAMBDA(a,v, a + (v.Name = c)) ) ) ), VSTACK({"Country","#"}, HSTACK(names, counts)) )
to generate
- SergeiBaklanDiamond Contributor
- johkelCopper Contributor
SergeiBaklan thank you, I can confirm that .Name solves the reference issue. Much appreciated!
- SergeiBaklanDiamond Contributor
johkel , you are welcome