I don't think you can do this ootb... unless you are on 9.3 and are able to use Scriban.
There is a workaround though - but it's a dirty hack and maybe not upgrade-proof. I used to have an issue where I had to use a data attribute in a section to get a value from a referenced item - which also didn't work as those attributes work on text fields only.
After some discussion with Support and the Sxa team, we found a solution by overriding a part of the
RenderVariantField pipeline. In our case the variant was a section, so we had to override RenderSection. Seems to be the same in your case (looking at the image).
You can override the
GetAttributeTokenValue function (which expects a fieldname and item) to implement your needed logic and then return to the base logic. If I understand correctly you should "invent" some name as you do not need an actual field value.
More info on my blog: https://ggullentops.blogspot.com/2018/10/using-tokens-in-sitecore-sxa-variant.html