Calculate difference between values from individual meters

The read out values of different meters are stored in a file in date rows.
The difference of each individual meter between _thisrow [readout] and the previous read out value of that specific meter has to be calculted and presented in a virtual column.
How to set up a formula for that in a virtual column ?

1 Like

I actually have a need for this and because of your question I finally took a stab at it. Took me about 5 minutes to figure it out luckily. But, it is quiet intensive and your setup might not be exactly the same.

And my setup specifically lists the meters as their own location with inspections (read outs in your case) being located in a reference table.

image

3 Likes

You need to find the last readout for that particular meter and subtract it from your new reading.

I have managed this by using 2 VCs and one physical column.

VC_1: [Last Readings] (ref type, referencing the readings table)
maxrow(
“Meter Readings”,“Reading”,
([Meter] = [_THISROW].[Meter])
)

VC_2: [Last Read] (number type)
[Last Readings].[Reading]

Physical Column: [Consumption] (number type)
[Reading]-[Last Read]

Using this the last reading will be subtracted from the current reading to give you a consumption.

3 Likes