General Discussions

Discuss any topics that are not product-specific here.

map_values code

Kardasz
6 - Meteoroid

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

2 REPLIES 2
Qiu
20 - Arcturus
20 - Arcturus

This is really puzzle for me. 😁

Kardasz
6 - Meteoroid

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}

Labels