Forum Discussion
How to Display Maintenance Events on a Production Profile Line Chart in Power BI Hello every
| well ID | Date (month) | Intervention Key |
| A1 | 12-2-2022 | AH-L |
| A2 | 15-1-2023 | WL |
| A1 | 5-4-2022 | KT |
| A1 | 15-8-2022 | WL |
| A2 | 15-2-2023 | DHSV |
| A2 | 10-7-2023 | KT-L |
| A1 | 01-01-2023 | WL |
Hello everyone,
I need help visualizing maintenance events on my production profile chart in Power BI.
I have two tables:
Production Table (continuous data)
- Date (monthly records)
- Water rate per month
- Well ID
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_Name | Date | Water Rate |
| A1 | 01/01/2022 | 6410.55 |
| A1 | 01/02/2022 | 4763.06 |
| A1 | 01/03/2022 | 1886.78 |
| A1 | 01/04/2022 | 4982.87 |
| A1 | 01/05/2022 | 3513.59 |
| A1 | 01/06/2022 | 4625.7 |
| A1 | 01/07/2022 | 5682.58 |
| A1 | 01/08/2022 | 6426.62 |
| A1 | 01/09/2022 | 1369.74 |
| A1 | 01/10/2022 | 2662.49 |
| A1 | 01/11/2022 | 3323.58 |
| A1 | 01/12/2022 | 3468.75 |
| A1 | 01/01/2023 | 5476 |
| A1 | 01/02/2023 | 2632.59 |
| A1 | 01/03/2023 | 5823.45 |
| A1 | 01/04/2023 | 1064.18 |
| A1 | 01/05/2023 | 4437.96 |
| A1 | 01/06/2023 | 4025.36 |
| A1 | 01/07/2023 | 5971.96 |
| A1 | 01/08/2023 | 6067.46 |
| A1 | 01/09/2023 | 1257.81 |
| A1 | 01/10/2023 | 1874.9 |
| A1 | 01/11/2023 | 7344.33 |
| A1 | 01/12/2023 | 3023.12 |
| A2 | 01/01/2022 | 3513.59 |
| A2 | 01/02/2022 | 3364.77 |
| A2 | 01/03/2022 | 1495.19 |
| A2 | 01/04/2022 | 6674.6 |
| A2 | 01/05/2022 | 4238.58 |
| A2 | 01/06/2022 | 3225.12 |
| A2 | 01/07/2022 | 1300.68 |
| A2 | 01/08/2022 | 3998.92 |
| A2 | 01/09/2022 | 1118.96 |
| A2 | 01/10/2022 | 5921.35 |
| A2 | 01/11/2022 | 5052.11 |
| A2 | 01/12/2022 | 2643.31 |
| A2 | 01/01/2023 | 3327.48 |
| A2 | 01/02/2023 | 6386.45 |
| A2 | 01/03/2023 | 6116.75 |
| A2 | 01/04/2023 | 3931.94 |
| A2 | 01/05/2023 | 7606.3 |
| A2 | 01/06/2023 | 3931.94 |
| A2 | 01/07/2023 | 3886.92 |
| A2 | 01/08/2023 | 6913.59 |
| A2 | 01/09/2023 | 2602.6 |
| A2 | 01/10/2023 | 3322.71 |
| A2 | 01/11/2023 | 2828.76 |
| A2 | 01/12/2023 | 1902.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 ?
Add a dimension for wells. And change the acidental 1:1 date->maintance with 1:many
Wells = DISTINCT( Production[WELL_Name] )