This is my first attempt at designing a star schema for a reporting requirement and I'm new to this entire concept.
I have the requirement to report kwh used for a service in a month. This kwh can be broken down into different "buckets" based on the type of rate the service is billing on. I need to know how much kwh was in each of those buckets in a month. The issue I ran into is that rate can change retroactively, changing how the kwh is bucketed.
So i have this.
Fact_Service_Daily_Usage
UsageKey
UsageDate
RateKey
ServiceKey
TotalUsage
InsertDatetime
LineageKey
An example of this usage could be....
10/01/2019
Bucket 1
123
100 KWH
---------------------
10/01/2019
Bucket 2
123
300 KWH
But then the business realized the service was on the wrong rate and changes it. Then the kwh would look like this for the same service.
10/01/2019
Bucket 1
123
400 KWH
How can i handle this in a fact table?? with the changes.
Please help.
I have the requirement to report kwh used for a service in a month. This kwh can be broken down into different "buckets" based on the type of rate the service is billing on. I need to know how much kwh was in each of those buckets in a month. The issue I ran into is that rate can change retroactively, changing how the kwh is bucketed.
So i have this.
Fact_Service_Daily_Usage
UsageKey
UsageDate
RateKey
ServiceKey
TotalUsage
InsertDatetime
LineageKey
An example of this usage could be....
10/01/2019
Bucket 1
123
100 KWH
---------------------
10/01/2019
Bucket 2
123
300 KWH
But then the business realized the service was on the wrong rate and changes it. Then the kwh would look like this for the same service.
10/01/2019
Bucket 1
123
400 KWH
How can i handle this in a fact table?? with the changes.
Please help.