The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Sorry about the title but it's hard to condense it to a sentence and make sense.
This is what I am trying to achieve (col C):
Name | Reports To | Layers From D |
A | B | 3 |
B | F | 2 |
C | F | 2 |
D | - | 0 |
E | B | 3 |
F | D | 1 |
Given Col A and Col B, I want a calculated column to see how far a person is in the reporting structure from D. So for example, C reports to F who reports to D, so 2 layers from D.
From a programming perspective, I think the approach is to go iteratively go through each person in COl A and use a counter to add +1 until person D is reached. But I am lost on how to implement it in PBI. Any suggestions?
Solved! Go to Solution.
using path function