Forum Discussion

neeesz780's avatar
neeesz780
Regular Visitor
1 year ago
Solved

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 ?

 

 

7 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    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.

    • neeesz780's avatar
      neeesz780
      Regular Visitor

      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 

  • Deku's avatar
    Deku
    Super User

    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