Calculation in trend


I have a digital energymeter with day and night counter.
I can make a trend with the day and one with the night counter.
I want to show the sum.
I can do this with a rule the write to a new item.
Is the a possibility to do this without this. The problem is that it will calculate from the moment that i create is, and not with the existing data.
Also, then OpenHab must store the calculation in the database, what is not necessaire, because the separate values are already stored.