Try something like this:
TagTot('Total Smelter AC KWH_TTL',BOM(BOM('*')-1),BOM('*')-1)
BOM('*')-1 is the beginning of the current month minus one second; in other words, the end of the previous month.
thanks avanfosson