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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
neeesz780
Regular Visitor

How to Display Maintenance Events on a Production Profile Line Chart in Power BI Hello every

well ID Date (month)Intervention Key
A112-2-2022AH-L
A215-1-2023WL
A15-4-2022KT
A115-8-2022WL
A215-2-2023DHSV
A210-7-2023KT-L
A101-01-2023WL

 

 

Hello everyone,

I need help visualizing maintenance events on my production profile chart in Power BI.

I have two tables:

  1. Production Table (continuous data)

    • Date (monthly records)
    • Water rate per month
    • Well ID
  2. Maintenance Table (non-continuous data)

    • Well ID
    • Date of maintenance
    • Maintenance code

I would like to:

  • Overlay maintenance events as markers or flags on the production profile line chart.
  • Enable dynamic tooltips when hovering over a maintenance event to show production data before and after the maintenance.

Is there an easy way to achieve this in Power BI? Any suggestions or best practices would be greatly appreciated!

Thanks in advance

**I've provided sample data for the maintenance  table above & sample production data below ** 

 

WELL_NameDateWater Rate 
A101/01/20226410.55
A101/02/20224763.06
A101/03/20221886.78
A101/04/20224982.87
A101/05/20223513.59
A101/06/20224625.7
A101/07/20225682.58
A101/08/20226426.62
A101/09/20221369.74
A101/10/20222662.49
A101/11/20223323.58
A101/12/20223468.75
A101/01/20235476
A101/02/20232632.59
A101/03/20235823.45
A101/04/20231064.18
A101/05/20234437.96
A101/06/20234025.36
A101/07/20235971.96
A101/08/20236067.46
A101/09/20231257.81
A101/10/20231874.9
A101/11/20237344.33
A101/12/20233023.12
A201/01/20223513.59
A201/02/20223364.77
A201/03/20221495.19
A201/04/20226674.6
A201/05/20224238.58
A201/06/20223225.12
A201/07/20221300.68
A201/08/20223998.92
A201/09/20221118.96
A201/10/20225921.35
A201/11/20225052.11
A201/12/20222643.31
A201/01/20233327.48
A201/02/20236386.45
A201/03/20236116.75
A201/04/20233931.94
A201/05/20237606.3
A201/06/20233931.94
A201/07/20233886.92
A201/08/20236913.59
A201/09/20232602.6
A201/10/20233322.71
A201/11/20232828.76
A201/12/20231902.28

 

End result,

1- display  production profile as a line and marker only to display if maintenance even took place on that month 

2- when hoovering over marker or intervention even to display its code and production value before that date and post that date as tooltip ?

 

 

2 ACCEPTED SOLUTIONS
Deku
Community Champion
Community Champion

Deku_0-1742137915759.png

https://github.com/EvaluationContext/Forum-Answers/blob/main/water%20rate.pbix


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

View solution in original post

Deku
Community Champion
Community Champion

Add a dimension for wells. And change the acidental 1:1 date->maintance with 1:many

 

Wells = DISTINCT( Production[WELL_Name] )

 

Deku_0-1742219609415.png

Deku_1-1742219714589.png

 


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

View solution in original post

7 REPLIES 7
Deku
Community Champion
Community Champion

Firstly made sure you have date dimension hooked up to the two tables.

 

Then add a measure with a constant value

 

RefLine =

calculate(

max( production[water rate],

Removefilters( dates )

)

Add the line, and make it invisible. 

You could could use custom data labels with a measure like below to show a icon when there was maintenance 

 

If( not isempty( maintenance ), "🔧")

 

You can just use the date dimension as the drillthrough for the custom tooltip


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!
Deku
Community Champion
Community Champion

Deku_0-1742137915759.png

https://github.com/EvaluationContext/Forum-Answers/blob/main/water%20rate.pbix


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

Hi Deku, thanks for your help it worked perfectly fine but what I noticed is that maintenance events are duplicated on the graph for both wells A1 , A2 ? you can't filter using wells 

Any idea why?  

Deku
Community Champion
Community Champion

Add a dimension for wells. And change the acidental 1:1 date->maintance with 1:many

 

Wells = DISTINCT( Production[WELL_Name] )

 

Deku_0-1742219609415.png

Deku_1-1742219714589.png

 


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

@Deku  Thanks a lot ...its working perfectly now ...all the best 

Greg_Deckler
Super User
Super User

@neeesz780 Sounds very possible. But, without sample data to mockup a solution, kind of difficult to be more specific than that.

 

Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Good day @Greg_Deckler , I've updated details with sample data for both tables and expected result ....what is more important is to flag these events on my production profile in any way possible - ideally as a marker 

 

Appreciate your help 

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

May 2025 Monthly Update

Fabric Community Update - May 2025

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