I received this code from someone who wrote it in Gazelle. I am trying to make it work in Alteryx. Can anyone help with that.
sum(reduce(map_values(map_filter(impressions_by_platform, (k, v) -> k like '%_only_tv')), 0, (s, x) -> s + x, s -> s)) total_tv_impressions
This is really puzzle for me. 😁
The field impressions_by_platform contains the following as an example if this helps:
{"ctv":94,"dsk_only_tv":336,"mbl":1817,"ctv_only_ctv":94,"dsk_mbl":2153,"dsk":336,"mbl_only_mbl":1817}