Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Table GroupBy using multiple parent levels

Hello,

I have a dataset similar to the one below for project management (with multiple parents).

 

IDTittle                         Level        Parent_Tittle          Subproject
1Project Tittle 11Project Tittle 1SUB1
2Project Tittle 12SUB1ENDPROJECT1
3Project Tittle 11Project Tittle 1SUB2
4Project Tittle 12SUB2ENDPROJECT2
5Project Tittle 11Project Tittle 1SUB3
6Project Tittle 12SUB3ENDPROJECT3
7Project Tittle 12SUB3ENDPROJECT4
8Project Tittle 13ENDPROJECT4ENDENDPROJECT1
9Project Tittle 13ENDPROJECT4ENDENDPROJECT2
13Project Tittle 21Project Tittle 2SUB4
15Project Tittle 22SUB4ENDPROJECT5
16Project Tittle 22SUB4ENDPROJECT6
17Project Tittle 22SUB4ENDPROJECT7
18Project Tittle 23ENDPROJECT7ENDENDPROJECT3
19Project Tittle 22SUB4ENDPROJECT8

 

I would like to create a table for visualization that is collapsible and respects multiple parent criteria, similar to the mockup below.

 

hetzaf_0-1719536716146.png

 

I tried to do it using a matrix, but I was unsuccessful. I also searched here on the forums, but each case was very specific to the user's dataset.

 

Could anyone help on:

  • Creating (or formatting) the table and visual?
  • Creating a column that indicates if the row has any child (eg. if it is not a parent from any other following row)? I need to filter the last items for each ProjectTitle


Thank you in advance.

 

@Edit: reformat table, misspellings and better clarifitcation.

4 REPLIES 4
Anonymous
Not applicable

Hi @Anonymous ,

Try rebuilding the table by level like this:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("nZGxDsIgEEB/pbmZhYOWdlW7OGij7USYTAeNSRPD/8fIaQx4NMERuJcHD2tBgoDhsdzmi6/Gq/f3uXptZbbP00aCExaQP8fPjID+sBtOx32/HYlQpSIMmF4VYSQioi4VqYA1qyIViYgwBYQORMsT6WhYpf26v1hKIpn4yDd5357uK5mW+H2ijtw1IUzHLNIQwoTMIoYQpiT+1DBpDfo3yaTM+lpw7gk=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ID = _t, Tittle = _t, Level = _t, Parent_Tittle = _t, Subproject = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"ID", Int64.Type}, {"Tittle", type text}, {"Level", Int64.Type}, {"Parent_Tittle", type text}, {"Subproject", type text}}),
    #"Filtered Rows" = 
    let
        level1 = Table.SelectRows(#"Changed Type", each ([Level] = 1)),
        level2 = Table.SelectRows(#"Changed Type", each ([Level] = 2)),
        level3 = Table.SelectRows(#"Changed Type", each ([Level] = 3)),
        table12 = Table.ExpandTableColumn(Table.NestedJoin(level1, {"Subproject"}, level2, {"Parent_Tittle"}, "Data", JoinKind.LeftOuter), "Data", {"Subproject"}, {"Subproject.1"}),
        table123 = Table.ExpandTableColumn(Table.NestedJoin(table12, {"Subproject.1"}, level3, {"Parent_Tittle"}, "Data", JoinKind.LeftOuter), "Data", {"Subproject"}, {"Subproject.2"})

    in
        table123
in
    #"Filtered Rows"

vcgaomsft_0-1720419035473.png

vcgaomsft_1-1720419063245.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group

PijushRoy
Super User
Super User

Hi @Anonymous 

Please break the table as per level and create a relationship. Please find the attached PBIX below

PijushRoy_0-1719556637895.png

 

Update matrix layout as per your requirement

PijushRoy_1-1719556786509.png

 


Let me know if that works for you


If your requirement is solved, please make THIS ANSWER a SOLUTION ✔️ and help other users find the solution quickly. Please hit the LIKE 👍 button if this comment helps you.

Thanks
Pijush
Linkedin




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





Anonymous
Not applicable

Hello,

Firstly, thank you for your help and time invested.

It kinda works: problem is that I have a dataset around 800K rows, and sometimes I can have "ENDPROJECT4 > ENDENDPROJECT2" or a new "ENDPROJECT4 > ENDENDPROJECT77 (new)" attached to Multiple Project Tittles (first column). At least in my matrix, every ENDENDPROJECT is being shown when I expand the Project Tittle 1 (also the Project Tittles 2, 3 and so on than have the same project name". In other words, it should properly filter every column expanded before.

Hi @Anonymous 
Understood
It depends on how many level do you have in level column (3rd in your demo data)




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.