Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Related table and slicer

Hello,

 

I have in my model, 3 tables

Dim project which contains projectskey, other info and ProjectManagerSkey.

Dim Employee which contains, firstname, lastname, fullname, employeeskey, employeeid and so on.

and 

Dim Employee ProjMgr = RELATEDTABLE('Dim Employee')
 
In Dim Project, I have a Field named ProjectManagerSkey.
So it is possible to link Dim Employee ProjMgr as PM and Dim Project as P on(PM.employeskey=P.ProjectManagerSkey).
 
In that manner, it is possible to bring into a table or a matrix, the firstname, lastnme and fullname of the project manager.
 
But the difficulty arise, when we use the Project Manager Name from Dim Employee ProjMgr because it show the name of all the employees available in dim employee not only the managers name.
 
Is there a nice way to solve this problem.
Thanks in advance for your assistance.
 
  • Have you created the table relationship from the relationship tab within Power BI Desktop?

     

     

    After you create the table relationship it should filter the matrix depending on what columns you select, if not you can always apply a visual filter to not display blank entries in ProjMgr.

3 Replies

  • RMB's avatar
    RMB
    Icon for Resolver II rankResolver II

    Have you created the table relationship from the relationship tab within Power BI Desktop?

     

     

    After you create the table relationship it should filter the matrix depending on what columns you select, if not you can always apply a visual filter to not display blank entries in ProjMgr.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hello, I don't have any issue with the matrix or the table.  I am able to obtain the Project Manager Name using the ProjectManagerSkey.

       

      However, it is in the slicer.  Even if I use the field project Manager from the related table, it show all the name in Dim Employee.  The Slicer does not care about the link.

       

      Maybe I doing something wrong.

      Does someone could help me with that issue.

       

      • RMB's avatar
        RMB
        Icon for Resolver II rankResolver II

        What direction is the relationship? The problem could be if the columns on your slicer are from the table that can't be filtered by the other. Images or a sample pbix of what you have would be helpful.