Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Employee Manager Relationship - how to use PATH with monthly data

I want to use PATH() & related DAX functions (PATHITEM, PATHITEMREVERSE, etc.) however my data set from HR is expanded each month to include the latest updates (employees are added, lost, switch teams & report to new managers, etc.)

 

How can I use the PATH() function with the below type of data?

RalphKaz_0-1652452573563.png

Thank you!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

FYI to everyone - I was able to solve this myself by creating 2 new columns that concatenate the Year-Month-ManagerID & Year-Month-EmployeeID and then feeding those 2 columns into the PATH statements.  Works great!

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

FYI to everyone - I was able to solve this myself by creating 2 new columns that concatenate the Year-Month-ManagerID & Year-Month-EmployeeID and then feeding those 2 columns into the PATH statements.  Works great!

Whitewater100
Solution Sage
Solution Sage

Hi:

Your table can be set up like below.

Whitewater100_0-1652465326789.png

Then here are some calc columns with path measures:

Hierarchy = PATH(Employees[EmployeeID],Employees[SupervisorID])
Hiearchy CT = PATHLENGTH(PATH(Employees[EmployeeID], Employees[SupervisorID]))
Path Item #2 = PATHITEM(PATH(Employees[EmployeeID],
Employees[SupervisorID]),2,1)
Path Item #2 = PATHITEM(PATH(Employees[EmployeeID],
Employees[SupervisorID]),3,1)   etc
Then your table can look like:
Whitewater100_1-1652465487092.png

I hope this solves your question. Thanks..

 
Anonymous
Not applicable

Hi Whitewater - thanks for the reply but I know how the data "should" be setup for the PATH() function - problem is my data is structed correctly BUT it's monthly data in a single table so I need the PATH functions to only look at 1 month at a time... 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.