Calculating consumption based on meter data seems simple. However, complex situations can be challenging. Let's see how we can solve this.
When we have meter data, such as we can obtain from home energy or water meters, we want to calculate consumption from these values over time. What is very simple with one meter can be complicated if we have several meters for different zones, values, etc. Let's see how we can solve this in Power BI.
Most of the time we work with transactional data.
Each row describes an event (or transaction) from the source system.
Then we have stock data, such as the number of units of a particular product in our store, which can change over time.
Or we have data from meters, which changes over time, such as, for example, the electricity meter at home.
When we want to calculate consumption, we sort the data by date and time when we take the value from the counter and subtract the current value from the previous value. Et ready, we have the consumption.
Now let's imagine that we have several houses in different addresses and with several meters in each house.