Forum Discussion
Path and Matrix
- 8 years ago
[mPath] was created in your DAX calculated column or is that in your original dataset?
If it was in DAX, then why not continue with the article's example model?
If it is in your original dataset then I may not be able to assist further other than to say transform [mPath] to look like the article's model using a method like https://www.nimblelearn.com/using-dax-to-split-delimited-text-into-columns/ to create [lvl1], [lvl2], etc.I created a sample from scratch and followed the example model to produce:
from:
ID Parent_ID Employee Salary 1 2 Mike 3000 2 5 Sally 5000 3 2 Diane 3000 4 5 Randy 5000 5 Alan 6000 6 1 David 2000 7 4 Susan 3000 8 5 Carrie 4000 9 8 Luther 3000 10 5 Max 5000
[mPath] was created in your DAX calculated column or is that in your original dataset?
If it was in DAX, then why not continue with the article's example model?
If it is in your original dataset then I may not be able to assist further other than to say transform [mPath] to look like the article's model using a method like https://www.nimblelearn.com/using-dax-to-split-delimited-text-into-columns/ to create [lvl1], [lvl2], etc.
I created a sample from scratch and followed the example model to produce:
from:
| ID | Parent_ID | Employee | Salary |
| 1 | 2 | Mike | 3000 |
| 2 | 5 | Sally | 5000 |
| 3 | 2 | Diane | 3000 |
| 4 | 5 | Randy | 5000 |
| 5 | Alan | 6000 | |
| 6 | 1 | David | 2000 |
| 7 | 4 | Susan | 3000 |
| 8 | 5 | Carrie | 4000 |
| 9 | 8 | Luther | 3000 |
| 10 | 5 | Max | 5000 |
ChrisMendoza I found your example here to be a real good complement to Marco Russo's parent child hierarchy article in the dax pattern website https://www.daxpatterns.com/parent-child-hierarchies/