Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need some help for solving something below. Please note the example is a highly abstracted version of my problem, but highlights well what I need to accomplish.
So I have 2 tables (n1 and n5 - shown below).
Because of some broader complexities with our data model, I need to create DYNAMICALLY on the front end, not in the load script, a table that shows as below (I cannot merge the n1_name and n5_name into a single table via the load script).
I've managed to get something kind of working by doing the below
n1_name | sum(n1_dollar) | SUM(IF(n1_name = n5_name, n5_dollars))
Except the issue with the third column is that because John appears twice on the n5 table, it will double count the n5_dollars = 2, so the output will be 4, which is incorrect.
To re-iterate, I cannot change anything with my data model, I'm trying to find a script only solution.
Many thanks
@johnnyjohn try below
=sum(aggr(if(n1_name=n5_name,sum(n5_dollar)),n1_name,n5_name))
how are those tables associated?
For the sake of this example you can assume they are not connected. In reality they are not island tables but re-evaluating the entire data model would be overdoing it. Thanks!
@johnnyjohn try below
=sum(aggr(if(n1_name=n5_name,sum(n5_dollar)),n1_name,n5_name))