Hi, so in my database i have a Data Type that has multiple fields, one of them is a different Data Type, so when i create a chart, i want to group by the parent Data Types creation date, but i want the information displayed on the chart, to be a sum of all the child Data Types prices, but i cannot seem to find a way to do this, any help would be greatly appreciated.
I’m not sure what your set up is exactly, but let’s say you have two tables called Emissions
and Locations
. Each Location
has some Emissions
associated with it.
In your chart you can Do search for
for Emissions
and the do a group by
method to group them by a Location
.
Hi thanks for your reply, apologies for not clarifying as this is not exactly what i am after. I have two data types, one is bookingUser (which contains a field of dataType bookingSupplier), bookingUser is created when a user books an item, i want to create a chart that shows all bookingUsers grouped by creationDate (daily, weekly, monthly) but have the data in each point be the sum of all bookingSuppliers prices
currently i can only search for all bookingUsers and group by creation date, i cannot aggregate or choose the data field to be a sum of bookingSuppliers price
Ah, I think I see what you mean. I don’t think you can aggregate by a field from a different data type (at least that’s how I understood your question). You can only aggregate based on the data type you are searching for.
What you might want to do (if this is your case) is create satellite data types in bookingUser
where you will hold the sum. You can update that field via Database Triggers
every time there is a new booking and/or there is a change to a booking.
Petter Amlie has a blog post on satellite data types you might want to check out.
Apologies, if I misunderstood your question