Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hi,
I'm using the PATH function in DAX to work out the hierarchy in an organsation, but as usual I have data quality issues which cannot be resolved in the source data. My HR table has invalid parent data eg.
| Emp Name | EmpID | Supervisor ID |
| Amir | 1 | 1 |
| Sharon | 2 | 1 |
| John | 3 | 4 |
John has an invalid Supervisor ID. How would I write DAX to create a new table where Supervisor ID is not in the EmpID column. My resulting table would as follows, ie without the row containing the invalid supervisor ID.
| Emp Name | EmpID | Supervisor ID |
| Amir | 1 | 1 |
| Sharon | 2 | 1 |
I should add I have 50k plus rows so something that's not hard coding the supervisorID would be great!
Thanks, Ben.
Solved! Go to Solution.
@BenHoward
Create a new table:
New Table =
FILTER(
Table1,
Table1[Supervisor ID] IN ALL(Table1[EmpID])
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Fantastic, thank you. One last question if I may, assuming my 1st table had 10 other columns, but I only wanted to return the 3 columns Emp Name, EmpId and Supervisor Id, how would I do that? Thanks again!!
You can use SELECTCOLUMNS function
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@BenHoward
Create a new table:
New Table =
FILTER(
Table1,
Table1[Supervisor ID] IN ALL(Table1[EmpID])
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 45 | |
| 38 | |
| 34 | |
| 21 | |
| 17 |
| User | Count |
|---|---|
| 66 | |
| 65 | |
| 31 | |
| 26 | |
| 26 |