0

I’m working on a Power BI model with the following relationships:

DimManager is connected to DimProjects through a direct relationship (via ManagerID). DimProjects contains project-level details and is connected to DimTasks through ProjectID. DimTasks contains task-level details, including TaskID and ProjectID.

Problem: When I add a slicer for ManagerName from DimManager, it filters the DimProjects table as expected. However, it does not propagate to the DimTasks table, meaning that the tasks shown are not filtered by the selected manager.

enter image description here

Relationships in the Model: DimManager → DimProjects (Active, via ManagerID). DimProjects → DimTasks (Inactive, via ProjectID).

Expected Behavior: If I select "Alice" in the slicer, only Task 1 (associated with Project A) should appear in the tasks table.

Question:

  1. Why does the filter on ManagerName fail to propagate to the DimTasks table?
  2. How can I fix this so that filtering on ManagerName in the slicer filters the tasks table correctly?
2
  • Dimensions should never be connected to each other; only to fact tables. You need to change your data model (hint: tasks should be a fact table, not a dimension). Commented Nov 19, 2024 at 7:49
  • My Fact Table is the Timesheet, which only contains the transactional records, Is it a good idea to add task details to fact table? Commented Nov 19, 2024 at 14:46

1 Answer 1

0

I think the problem is the relationship between project and task tables are inactive. Please try to change the relationship to active.

or you can try merge tables in PQ to get all data in one table

let
    Source = Table.NestedJoin(Manager, {"ManagerID"}, Project, {"ManagerID"}, "Project", JoinKind.LeftOuter),
    #"Expanded Project" = Table.ExpandTableColumn(Source, "Project", {"ProjectID", "ProjectName"}, {"ProjectID", "ProjectName"}),
    #"Merged Queries" = Table.NestedJoin(#"Expanded Project", {"ProjectID"}, Tasks, {"ProjectID"}, "Tasks", JoinKind.LeftOuter),
    #"Expanded Tasks" = Table.ExpandTableColumn(#"Merged Queries", "Tasks", {"TaskID", "TaskName"}, {"TaskID", "TaskName"})
in
    #"Expanded Tasks"

or you can use DAX to get the data from task table

taskID =
MAXX (
    FILTER ( Tasks, Tasks[ProjectID] = MAX ( Project[ProjectID] ) ),
    Tasks[TaskID]
)

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.