Hi everyone, I struggle to create a new calculated item based on the variables shown in the table below. Let's say we have many shops (each matched by single shop_id), offering specific offers (offer_id). These offers are flagged as "1", if they are successful. If at least one of the offers of a shop is successful, then the shop_success variable is flagged as "1" for every row matching the specific shop. Now, I would like to get the sum of distinct values of shop_success for each shop_id. So for this example I would want my calculated item to equal 3 (1 <for shop_id = 1> + 0 <for shop_id = 2> + 1 <for shop_id = 3> + 1 <for shop_id = 4>). What I feel could work is: sum _for all_ (distinct _by group_ (shop_success)), however nested aggregations are not supported, so I suppose that's the challenge I am facing here. I know how to do it with code, but I would like to use the provided table having only these variables. Thanks for any help 🙂
... View more