I want to calculate Total ad cost of sales (Ad cost / Revenue)
I am getting this by calling sales per day from my database bounded by a time period (last 30 days etc)
So I get a list of sales per day for the last 30 days.
Right now I am doing this: “Do a search for sales per day:each items Ad Cost:sum / do a search for sales per day:each items Revenue:sum”
It seems silly that I have to search for the same list twice in the same expression. Is there a better way to do this?
Should I add a 1 pixel repeating group with the list of sales per day and just reference that?
FWIW: I can’t (rather, don’t want to) use a “state” because the data needs to update dynamically depending on what the user does on the page and I didn’t build it to use states - I want to avoid the workflows associated with updating states and want it to just update when the user changes dates or account etc the way a repeating group or expression does