Forum Discussion

keatonbeyer's avatar
keatonbeyer
Frequent Visitor
10 months ago
Solved

Or Slicing between multiple tables

I am working with project data where I want to see all projects if a person is either managing a project or working on the project and I want to see it by their manager.

 

Slicer: Manager names

 

Project Table: Field - Project Owner

Task Table: Field - Task Owner

 

What I can't figure out is how to setup a slicer to say if project owner or if task owner, display the project line in the table. It only does one or the other. I see guidance saying create a calculation then apply it, but I don't know where it applies to or how to do that.

Solved: Power BI slicer OR condition - Microsoft Fabric Community

  • Create unifed dimension table

     

    Steps: 

    1. Create a combined Owner table as in Power Query (or DAX if preferred. below steps are PQ).
         ... append project owner column from the project table and task owner column from the task table.

         ... remove duplicates 

    2. name this table say "Person or Person dim" of your choice. and say column as "Name" Use it as your slicer source.

    3. Create relationsips

           ... Connect Person Dim[Name] to Project[Project Owner] (one-to-many).

           ... Connect PersonDim[Name] to Task[Task Owner] (one-to-many).

    4. Build visuals (remember for slicer use this new table)

     

6 Replies

  • Hi,

    Create a Dim table with names of all people - whether project owner or task owner.  Create a Many to One relationship from the 2 Fact tbales to the new Dim table.  To your visuals, drag name from the Dim table.

  • Create unifed dimension table

     

    Steps: 

    1. Create a combined Owner table as in Power Query (or DAX if preferred. below steps are PQ).
         ... append project owner column from the project table and task owner column from the task table.

         ... remove duplicates 

    2. name this table say "Person or Person dim" of your choice. and say column as "Name" Use it as your slicer source.

    3. Create relationsips

           ... Connect Person Dim[Name] to Project[Project Owner] (one-to-many).

           ... Connect PersonDim[Name] to Task[Task Owner] (one-to-many).

    4. Build visuals (remember for slicer use this new table)

     

    • keatonbeyer's avatar
      keatonbeyer
      Frequent Visitor

      This is close, but it is really just showing me when a project is owned by someone, or at least the result is the same as if I just take the project owner column.

       

      What I want to see is

      • John owns Project X as the project manager
      • John works on Project Y
      • Sam owns Project Y
      • John reports to Sue
      • Sam reports to David

      When Sue runs the report I want her to see Project X with John's name as the project manager and Project Y with Sam's name as the project manager. Right now I only get Project X.

       

      The problem I'm facing is its a many to many relationship. A person can own many projects, a person can work on many projects, therefore I'm looking for many people working on many projects associated to a manager. I swear I've done this in Tableau and it wasn't this difficult but its been years.

      • v-menakakota's avatar
        v-menakakota
        Community Support

        Hi keatonbeyer ,

        Thanks for reaching out to the Microsoft fabric community forum. 

        Is there a field in your PersonDim that defines each person’s manager?

        Best Regards, 
        Community Support Team