Forum Discussion
How to Sum based on active value in another table
If the tables don't have a relationship and you can't find a way to relate them (even through other tables), how are you expecting to total them?
The "test demos" table is made of unique ExperimentNames. Since there should only be 1 Experiment active at a time, I was looking for a way to get a filter on the associated country/platform with that experiment. Not sure of the methodology; a max or top 1 would be part of my solution if this was SQL.
- Anonymous8 years agoNot applicable
The issue is the lack of table relationship. I want to draw more attention to it as I feel that the hurdle you need to overcome. As you have mentioned only 1 experiement is active, but i am expecting there must something about that experiment that is unique enough that allows you to know how to relate it to the table contains the sales values? Should you look to create a composite key in both tables so you can relate both tables correctly?
From there you can rely on report context to ensure you are only summing active experiments.