Forum Discussion

New2PowerBI's avatar
New2PowerBI
Icon for Helper III rankHelper III
9 years ago
Solved

Creating a Line Chart Based by Supervisor

Very new to Power BI; would love some help!

 

I would like to create a line chart; one that displays work that is coming due over the next year, for multiple people, based on their supervisor. 

 

For example, if Joe Smith has 3 direct reports, then Joe Smith can select his name as the supervisor on a Slicer and the line chart would show 3 different colors, one for each of his direct reports, of the work that is due over the next year.

 

I'm pretty comfortable with the display portion; my dilema are the tables and relationships.

 

I have a "PERSON" table that has the supervisor...it notes all the employees and their supervisor.  Then I have a "Preventative Maintenance" table that has an "Implementer".  I want to display the counts of their preventative maintenace, but base it on the Implementer's supervisor.  Unfortunately, I cannot seem to relate the Person table to the PM table.

 

Hope this is enough information to get someone interested in helping me.  :-) 

 

 

  • MalS's avatar
    MalS
    9 years ago

    You probably need a 'lookup' table that has a unique list of Supervisor names and ID numbers. Use a relationship to join the ID numbers from both tables, then use the Supervisor name field in all your filters. 

3 Replies

  • MalS's avatar
    MalS
    Icon for Resolver III rankResolver III

    If the employee names in the Person table are identical to the implementer names in the Preventative Maintenance table, then you should be able to go to the Relationships view and drag a relationship from Implementer to Employee (see video).

     

     

     

    Then, when you filter by Supervisor on a visualization, only employees with that Supervisor will appear. 

     

     

     

    • New2PowerBI's avatar
      New2PowerBI
      Icon for Helper III rankHelper III

      Thanks for the video; that was awesome.  Helps to see.  Unfortunately the cell values are not the same, but your response got me to look at the data further; I found I needed another table to make the connection.

       

      PERSON TABLE TO A LABOR TABLE (Which has a PersonID and Labor Code)

       

      The Labor Code cell values are those named "Implementer" in the PREVENTATIVE MAINTENANCE TABLE.

       

      So connection solved!  

       

      Now a new issue...the SUPERVISOR name that displays is the person's number, i.e., 12345, and not their name.  Any tips on getting the Slicer to display their name?  

      • MalS's avatar
        MalS
        Icon for Resolver III rankResolver III

        You probably need a 'lookup' table that has a unique list of Supervisor names and ID numbers. Use a relationship to join the ID numbers from both tables, then use the Supervisor name field in all your filters.