Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Given the following table
| ID | Parent ID | AMOUNT | PATH |
| 1 | 10 | 1 | |
| 2 | 1 | 20 | 1|2 |
| 3 | 1 | 30 | 1|3 |
| 4 | 2 | 40 | 1|2|4 |
| 5 | 2 | 50 | 1|2|5 |
I want to create a Parent-Child visualization using matrix in Power BI.
Currently using DAX method PATH and PATHITEM I have this:
ID Amount
1 150
2 110
4 40
5 50
3 30
Is it possible to have :
ID Amount
1 150
1 10
2 110
2 20
4 40
5 50
3 30
Solved! Go to Solution.
Hi, @Anonymous
Based on your description, I created data to reproduc your scenario. The pbix file is attached in the end.
Table:
You may create calculated columns as below.
Path = PATH('Table'[ID],'Table'[Parent ID])
Level1 = PATHITEM('Table'[Path],1,TEXT)
Level2 =
var _level2 = PATHITEM('Table'[Path],2,TEXT)
return
IF(
PATHITEM('Table'[Path],2,TEXT)="",
[Level1],
_level2
)
Level3 =
var _level3 = PATHITEM('Table'[Path],3,TEXT)
return
IF(
_level3="",
IF(
[Level2]="",
[Level1],
[Level2]
),
_level3
)
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous
Based on your description, I created data to reproduc your scenario. The pbix file is attached in the end.
Table:
You may create calculated columns as below.
Path = PATH('Table'[ID],'Table'[Parent ID])
Level1 = PATHITEM('Table'[Path],1,TEXT)
Level2 =
var _level2 = PATHITEM('Table'[Path],2,TEXT)
return
IF(
PATHITEM('Table'[Path],2,TEXT)="",
[Level1],
_level2
)
Level3 =
var _level3 = PATHITEM('Table'[Path],3,TEXT)
return
IF(
_level3="",
IF(
[Level2]="",
[Level1],
[Level2]
),
_level3
)
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you @v-alq-msft that's what I wanted to do.
Just one last thing is it possible to avoid to repeat the node "1" three times?
(-)1
1
instead of
(-)1
(-)1
1
@Anonymous , refer if this can help
Thank you @amitchandak for your reply but in my case I don't have mutliple parents, when I unfold a parent node I just want to display the parent node among the children nodes, because the parent node has his own "amount" to display.
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 |
|---|---|
| 48 | |
| 46 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 70 | |
| 69 | |
| 32 | |
| 27 | |
| 26 |