Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
SteveAlstead
New Member

Calculate state of charge for battery

Hi all,

 

I have an interesting question, I think :).

 

We have a company where we have installed a set of solar panels. There is also a power connection to the grid. The surplus of solar energy is currently being returned to the grid. If there is a shortage of power, it is purchased again via the grid.

Now we have placed a battery in this system. The order is now:
- If there is a surplus of solar power, this is placed in the battery.
- If there is a shortage of power, the battery is drained first.
- If there is still a shortage, we will take the rest from the grid.

 

There are of course a number of conditions:
- The battery cannot be discharged beyond 0.
- The battery cannot be charged further than the maximum capacity of the battery. In this case it is 65.

 

Based on the data, I now want to calculate the state of charge of the battery, taking into account the order and conditions.

 

I have attached an Excel file with sample data with a column in which I calculated the state of charge. That should be the desired outcome. You can find the data here: Sample data 

 

Hopefully you can put me on the right track!

 

2 REPLIES 2
Anonymous
Not applicable

Hi, @SteveAlstead 

Your requirement involves a lot of row-level arithmetic, which is obviously not a simple thing to do in Power BI and requires a lot of time on it, will let you know if there is any progress on it.

Best Regards,
Yang

Community Support Team

Hi Yang,

Thank you in advance for your response, I am very much looking forward to a possible solution!

 

Kind regards,
Steve

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.