Self-joining querying

The goal of this example is to add Manager Name and Manager Title columns to an existing Employee dimension table:

  • The EmployeeKey and ParentEmployeeKey columns of the table are used in expressions to self-join the table.
  1. Create a query that retrieves the key columns of the hierarchy and the attribute columns to be added.
    • The existing table has the key columns, Employee Name, and Title.
Figure 127: Existing Employee Dimension
  • The new staging query references the existing dimension table and selects the required columns.
Figure 128: Manager Staging Expression
  • The ParentEmployeeKey from Figure 128 can be joined ...

Get Microsoft Power BI Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.