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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
paris
Helper V
Helper V

Create graph by start , end date

Hi All,

 

I like to create a graph by start and end date. 

I have a list of maintenance data and would like to create the graph shown below. Is it doable at Power BI, if so, how can I do?

 

PowerBI.JPG

 

All the best,

Paris

2 ACCEPTED SOLUTIONS
Jihwan_Kim
Super User
Super User

Picture1.png

 

Maintenance =
CALCULATE (
SUM ( Data[Capacity] ),
FILTER (
Data,
Data[Start] <= MAX ( Dates[Date] )
&& Data[End] >= MIN ( Dates[Date] )
)
)+0
 
 
 
 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

Hello Jihwan Kim

Thank you so much for your reply. I am sorry for keeping changing my comments. 

It worked perfectly when my data is monthly basis.  

 

My other data is daily baisis and I tried to use your famular again but it did not work.
I will repost it separately as people may find it very useful. 

All the best,

Paris

View solution in original post

5 REPLIES 5
Jihwan_Kim
Super User
Super User

Picture1.png

 

Maintenance =
CALCULATE (
SUM ( Data[Capacity] ),
FILTER (
Data,
Data[Start] <= MAX ( Dates[Date] )
&& Data[End] >= MIN ( Dates[Date] )
)
)+0
 
 
 
 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Hello Jihwan Kim

Thank you so much for your reply. I am sorry for keeping changing my comments. 

It worked perfectly when my data is monthly basis.  

 

My other data is daily baisis and I tried to use your famular again but it did not work.
I will repost it separately as people may find it very useful. 

All the best,

Paris

Ashish_Mathur
Super User
Super User

Hi,

You must transform your data into a 3 column one - Factory, Capacity and Date.  Please follow the steps here - Generating Rows by Month for Date Ranges in Power Query.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hello Ashish,

 

Following instructions, I added three columns. When I try to apply changes, the following error is shown.

 

OLE DB or ODBC error: [DataFormat.Error] We couldn't convert to Date.. 

 

Where should I check?

 

All the best,

Paris

Hi,

Go through each step in the Query Editor and stop at the one which returns an error.  Ensure that you have copied the correct M code from the Blog article i shared with you.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.