I am looking to calculate the total cost of energy used based on the following usage buckets:
- energy used up to 300 kWh will cost a unit price is $0.x / kwh
- energy used greater than 300 kWh but less than or equal to 600 kwh will cost a unit price is $0.y / kwh
- energy used greater than 600 kWh will cost a unit price is $0.z / kwh
I have a table which shows daily total energy ussage. I need to set up a DAX formula which calculates the total daily cost by parsing that total number into the buckets above and applying the unit costs at each level. I am totally new to DAX so struggling with how to set this up.