History data in the widget or values in the chart

I have a item with power consumption value, which is constantly increasing according to the real consumption.
I want show values for “today” “yesterday” “this month” and “previous month”
I can do a calculation in the rule and save values into special items. But is it really necessary to create next 4 items which also must be included into presistence when all data are already in the default consumption item ?

Is any chance calculate values directly in the widget or chart also can do it, but there I don’t know how to show data on the screen all the time, not only when the bar is clicked.

Unfortunately, you cannot do all those calculations within widget expressions.
I have published two rule templates for actual and historival energy consumptions and a simple smartmeter widget.

I also have a rule which calculate or create a “today”, “yesterday”, “this month” and “previous month” values from the consumption item. But why to make next 4 backuped items… :frowning:
But if there isn’t any other way, I have to live with it.