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
Peavey
Helper III
Helper III

How to get matrix to show subtasks and more levels

Hello,

 

I am trying to get a task list as a Matrix showing me subtasks and sub-subtasks.

This is a dataset sample: 

IDTask titleID maintask
1Task 1 
2Subtask 11
3Subtask 21
4Sub-subtask 13
5Task 2 
6Subtask 15
7Sub-subtask26

 

Any tips on how to?

 

Thanks

1 ACCEPTED SOLUTION
v-pagayam-msft
Community Support
Community Support

Hi @Peavey ,
Thank you @Akash_Varuna for the helpful response!

You may visualize your task–subtask–sub-subtask structure in a Matrix using a parent-child hierarchy approach. Here is  how you can do it:

  • Use the PATH function to build a hierarchy path based on your ID and ID maintask columns.
       TaskPath = PATH(Task[ID], Task[ID maintask])
  • Create additional calculated columns using PATHITEM to extract each level of the hierarchy (e.g., Level1, Level2, Level3).
    Level1 = PATHITEM(Task[TaskPath], 1, INTEGER)
    Level2 = PATHITEM(Task[TaskPath], 2, INTEGER)
    Level3 = PATHITEM(Task[TaskPath], 3, INTEGER)
  • Use LOOKUPVALUE to retrieve the task titles for each level based on the extracted IDs.
    Level1Title = LOOKUPVALUE(Task[Task title], Task[ID], Task[Level1])
    Level2Title = LOOKUPVALUE(Task[Task title], Task[ID], Task[Level2])
    Level3Title = LOOKUPVALUE(Task[Task title], Task[ID], Task[Level3])
  • Add the level title columns as rows in your Matrix visual in order (Level1Title, Level2Title, Level3Title).
  • You can optionally include any metric or placeholder like ID in the values section of the Matrix.

Please refer the attached screenshot and file for your reference.

vpagayammsft_1-1746523496043.png


If this answer meets your requirement,consider accepting it as solution.If still facing in resolving the issue,feel free to reachout!

Thank you.

Regards,
Pallavi.

View solution in original post

7 REPLIES 7
v-pagayam-msft
Community Support
Community Support

Hi @Peavey ,
Following up to check whether you got a chance to review the suggestion given.I hope this helps.If so,consider accepting it as solution,it will be helpful for other members of the community who have similar problems as yours to solve it faster. Glad to help.
Thank you.

v-pagayam-msft
Community Support
Community Support

Hi @Peavey ,
Have you found the solution for the query? If so, please share your solution and mark it as "Accept as Solution." This will assist others in the community who are dealing with similar problems and help them find a solution more quickly.
Thank you.

v-pagayam-msft
Community Support
Community Support

Hi @Peavey ,
Has the issue been resolved on your end? If so, please share your solution and mark it as "Accept as Solution." This will assist others in the community who are dealing with similar problems and help them find a solution more quickly.
Thank you.

v-pagayam-msft
Community Support
Community Support

Hi @Peavey ,
Thank you @Akash_Varuna for the helpful response!

You may visualize your task–subtask–sub-subtask structure in a Matrix using a parent-child hierarchy approach. Here is  how you can do it:

  • Use the PATH function to build a hierarchy path based on your ID and ID maintask columns.
       TaskPath = PATH(Task[ID], Task[ID maintask])
  • Create additional calculated columns using PATHITEM to extract each level of the hierarchy (e.g., Level1, Level2, Level3).
    Level1 = PATHITEM(Task[TaskPath], 1, INTEGER)
    Level2 = PATHITEM(Task[TaskPath], 2, INTEGER)
    Level3 = PATHITEM(Task[TaskPath], 3, INTEGER)
  • Use LOOKUPVALUE to retrieve the task titles for each level based on the extracted IDs.
    Level1Title = LOOKUPVALUE(Task[Task title], Task[ID], Task[Level1])
    Level2Title = LOOKUPVALUE(Task[Task title], Task[ID], Task[Level2])
    Level3Title = LOOKUPVALUE(Task[Task title], Task[ID], Task[Level3])
  • Add the level title columns as rows in your Matrix visual in order (Level1Title, Level2Title, Level3Title).
  • You can optionally include any metric or placeholder like ID in the values section of the Matrix.

Please refer the attached screenshot and file for your reference.

vpagayammsft_1-1746523496043.png


If this answer meets your requirement,consider accepting it as solution.If still facing in resolving the issue,feel free to reachout!

Thank you.

Regards,
Pallavi.

Peavey
Helper III
Helper III

Any help here please?

Akash_Varuna
Super User
Super User

@Peavey It can be done by creating a hierarchy in Power BI using the Task title field for each level. Ensure a relationship exists between ID maintask and ID for linking tasks and subtasks. Add this hierarchy to the "Rows" field of a matrix visual, and place your data in the "Values" field to display the structure.

Can you pls show me how to? 

I don't get it as I want since there are 3 levels.

Peavey_0-1746453036949.png

 

Thanks

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.

Top Solution Authors